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

23 lines
615 B
Django/Jinja

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