mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2024-11-10 07:53:29 +01:00
Actually fixes #28: Allow for virtualhost without documentroot.
This commit is contained in:
parent
2f9c001145
commit
554c74730c
2 changed files with 12 additions and 0 deletions
|
@ -14,12 +14,14 @@
|
||||||
{% if vhost.serveradmin is defined %}
|
{% if vhost.serveradmin is defined %}
|
||||||
ServerAdmin {{ vhost.serveradmin }}
|
ServerAdmin {{ vhost.serveradmin }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if vhost.documentroot is defined %}
|
||||||
<Directory "{{ vhost.documentroot }}">
|
<Directory "{{ vhost.documentroot }}">
|
||||||
AllowOverride All
|
AllowOverride All
|
||||||
Options -Indexes FollowSymLinks
|
Options -Indexes FollowSymLinks
|
||||||
Order allow,deny
|
Order allow,deny
|
||||||
Allow from all
|
Allow from all
|
||||||
</Directory>
|
</Directory>
|
||||||
|
{% endif %}
|
||||||
{% if vhost.extra_parameters is defined %}
|
{% if vhost.extra_parameters is defined %}
|
||||||
{{ vhost.extra_parameters }}
|
{{ vhost.extra_parameters }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -34,7 +36,9 @@
|
||||||
{% if vhost.serveralias is defined %}
|
{% if vhost.serveralias is defined %}
|
||||||
ServerAlias {{ vhost.serveralias }}
|
ServerAlias {{ vhost.serveralias }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if vhost.documentroot is defined %}
|
||||||
DocumentRoot {{ vhost.documentroot }}
|
DocumentRoot {{ vhost.documentroot }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
SSLEngine on
|
SSLEngine on
|
||||||
SSLCipherSuite {{ apache_ssl_cipher_suite }}
|
SSLCipherSuite {{ apache_ssl_cipher_suite }}
|
||||||
|
@ -49,12 +53,14 @@
|
||||||
{% if vhost.serveradmin is defined %}
|
{% if vhost.serveradmin is defined %}
|
||||||
ServerAdmin {{ vhost.serveradmin }}
|
ServerAdmin {{ vhost.serveradmin }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if vhost.documentroot is defined %}
|
||||||
<Directory "{{ vhost.documentroot }}">
|
<Directory "{{ vhost.documentroot }}">
|
||||||
AllowOverride All
|
AllowOverride All
|
||||||
Options -Indexes FollowSymLinks
|
Options -Indexes FollowSymLinks
|
||||||
Order allow,deny
|
Order allow,deny
|
||||||
Allow from all
|
Allow from all
|
||||||
</Directory>
|
</Directory>
|
||||||
|
{% endif %}
|
||||||
{% if vhost.extra_parameters is defined %}
|
{% if vhost.extra_parameters is defined %}
|
||||||
{{ vhost.extra_parameters }}
|
{{ vhost.extra_parameters }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -14,11 +14,13 @@
|
||||||
{% if vhost.serveradmin is defined %}
|
{% if vhost.serveradmin is defined %}
|
||||||
ServerAdmin {{ vhost.serveradmin }}
|
ServerAdmin {{ vhost.serveradmin }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if vhost.documentroot is defined %}
|
||||||
<Directory "{{ vhost.documentroot }}">
|
<Directory "{{ vhost.documentroot }}">
|
||||||
AllowOverride All
|
AllowOverride All
|
||||||
Options -Indexes +FollowSymLinks
|
Options -Indexes +FollowSymLinks
|
||||||
Require all granted
|
Require all granted
|
||||||
</Directory>
|
</Directory>
|
||||||
|
{% endif %}
|
||||||
{% if vhost.extra_parameters is defined %}
|
{% if vhost.extra_parameters is defined %}
|
||||||
{{ vhost.extra_parameters }}
|
{{ vhost.extra_parameters }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -33,7 +35,9 @@
|
||||||
{% if vhost.serveralias is defined %}
|
{% if vhost.serveralias is defined %}
|
||||||
ServerAlias {{ vhost.serveralias }}
|
ServerAlias {{ vhost.serveralias }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if vhost.documentroot is defined %}
|
||||||
DocumentRoot {{ vhost.documentroot }}
|
DocumentRoot {{ vhost.documentroot }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
SSLEngine on
|
SSLEngine on
|
||||||
SSLCipherSuite {{ apache_ssl_cipher_suite }}
|
SSLCipherSuite {{ apache_ssl_cipher_suite }}
|
||||||
|
@ -49,11 +53,13 @@
|
||||||
{% if vhost.serveradmin is defined %}
|
{% if vhost.serveradmin is defined %}
|
||||||
ServerAdmin {{ vhost.serveradmin }}
|
ServerAdmin {{ vhost.serveradmin }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if vhost.documentroot is defined %}
|
||||||
<Directory "{{ vhost.documentroot }}">
|
<Directory "{{ vhost.documentroot }}">
|
||||||
AllowOverride All
|
AllowOverride All
|
||||||
Options -Indexes +FollowSymLinks
|
Options -Indexes +FollowSymLinks
|
||||||
Require all granted
|
Require all granted
|
||||||
</Directory>
|
</Directory>
|
||||||
|
{% endif %}
|
||||||
{% if vhost.extra_parameters is defined %}
|
{% if vhost.extra_parameters is defined %}
|
||||||
{{ vhost.extra_parameters }}
|
{{ vhost.extra_parameters }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue