diff --git a/templates/vhosts-2.2.conf.j2 b/templates/vhosts-2.2.conf.j2
index 3368d65..4f922f4 100644
--- a/templates/vhosts-2.2.conf.j2
+++ b/templates/vhosts-2.2.conf.j2
@@ -7,17 +7,21 @@
{% if vhost.serveralias is defined %}
ServerAlias {{ vhost.serveralias }}
{% endif %}
+{% if vhost.documentroot is defined %}
DocumentRoot {{ vhost.documentroot }}
+{% endif %}
{% if vhost.serveradmin is defined %}
ServerAdmin {{ vhost.serveradmin }}
{% endif %}
+{% if vhost.documentroot is defined %}
AllowOverride All
Options -Indexes FollowSymLinks
Order allow,deny
Allow from all
+{% endif %}
{% if vhost.extra_parameters is defined %}
{{ vhost.extra_parameters }}
{% endif %}
@@ -32,7 +36,9 @@
{% if vhost.serveralias is defined %}
ServerAlias {{ vhost.serveralias }}
{% endif %}
+{% if vhost.documentroot is defined %}
DocumentRoot {{ vhost.documentroot }}
+{% endif %}
SSLEngine on
SSLCipherSuite {{ apache_ssl_cipher_suite }}
@@ -47,12 +53,14 @@
{% if vhost.serveradmin is defined %}
ServerAdmin {{ vhost.serveradmin }}
{% endif %}
+{% if vhost.documentroot is defined %}
AllowOverride All
Options -Indexes FollowSymLinks
Order allow,deny
Allow from all
+{% endif %}
{% if vhost.extra_parameters is defined %}
{{ vhost.extra_parameters }}
{% endif %}
diff --git a/templates/vhosts-2.4.conf.j2 b/templates/vhosts-2.4.conf.j2
index 3151a59..fe1b3b8 100644
--- a/templates/vhosts-2.4.conf.j2
+++ b/templates/vhosts-2.4.conf.j2
@@ -7,16 +7,20 @@
{% if vhost.serveralias is defined %}
ServerAlias {{ vhost.serveralias }}
{% endif %}
+{% if vhost.documentroot is defined %}
DocumentRoot {{ vhost.documentroot }}
+{% endif %}
{% if vhost.serveradmin is defined %}
ServerAdmin {{ vhost.serveradmin }}
{% endif %}
+{% if vhost.documentroot is defined %}
AllowOverride All
Options -Indexes +FollowSymLinks
Require all granted
+{% endif %}
{% if vhost.extra_parameters is defined %}
{{ vhost.extra_parameters }}
{% endif %}
@@ -31,7 +35,9 @@
{% if vhost.serveralias is defined %}
ServerAlias {{ vhost.serveralias }}
{% endif %}
+{% if vhost.documentroot is defined %}
DocumentRoot {{ vhost.documentroot }}
+{% endif %}
SSLEngine on
SSLCipherSuite {{ apache_ssl_cipher_suite }}
@@ -47,11 +53,13 @@
{% if vhost.serveradmin is defined %}
ServerAdmin {{ vhost.serveradmin }}
{% endif %}
+{% if vhost.documentroot is defined %}
AllowOverride All
Options -Indexes +FollowSymLinks
Require all granted
+{% endif %}
{% if vhost.extra_parameters is defined %}
{{ vhost.extra_parameters }}
{% endif %}