We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 19836bc commit aaa728eCopy full SHA for aaa728e
defaults/main.yml
@@ -14,6 +14,7 @@
14
# apache2_sites:
15
# - id: mysite (required)
16
# name: mysite.local (required)
17
+# document_root: ""
18
# ip: '*'
19
# port: 80
20
# state: present
templates/etc/apache2/sites-available/site/body.j2
@@ -1,5 +1,9 @@
1
ServerName {{ item.name }}
2
+ {% if item.document_root is defined %}
3
+ DocumentRoot {{ item.document_root }}
4
+ {% else %}
5
DocumentRoot {{ apache2_sites_basedir }}/{{ item.id }}/htdocs
6
+ {% endif %}
7
{% for value in item.aliases|default([]) %}
8
ServerAlias {{ value }}
9
{% endfor %}
0 commit comments