mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2025-01-03 08:40:18 +01:00
27 lines
686 B
Text
27 lines
686 B
Text
|
|
||
|
# Set up NameVirtualHosts.
|
||
|
NameVirtualHost *:{{ apache_listen_port }}
|
||
|
|
||
|
DirectoryIndex index.php index.html
|
||
|
|
||
|
{# Set up VirtualHosts - servername and documentroot are required. #}
|
||
|
{% for vhost in apache_vhosts %}
|
||
|
<VirtualHost *:{{ apache_listen_port }}>
|
||
|
ServerName {{ vhost.servername }}
|
||
|
DocumentRoot {{ vhost.documentroot }}
|
||
|
{% if vhost.serveradmin is defined %}
|
||
|
ServerAdmin {{ vhost.serveradmin }}
|
||
|
{% endif %}
|
||
|
<Directory "{{ vhost.documentroot }}">
|
||
|
AllowOverride All
|
||
|
Options -Indexes FollowSymLinks
|
||
|
Order allow,deny
|
||
|
Allow from all
|
||
|
</Directory>
|
||
|
{% if vhost.extra_parameters is defined %}
|
||
|
{{ vhost.extra_parameters }}
|
||
|
{% endif %}
|
||
|
</VirtualHost>
|
||
|
|
||
|
{% endfor %}
|