ansible-role-apache/templates/vhosts.conf.j2

27 lines
686 B
Text
Raw Normal View History

# 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 %}