blob: e561fd0cef1df6576e299fb55aa16a09f884e314 [file] [log] [blame]
{%- set site = salt['pillar.get']('apache:server:site:'+site_name) %}
{%- if site.root is defined %}
{%- set root = site.root %}
{%- else %}
{%- set root = '/srv/static/sites/'+site.name %}
{%- endif %}
<VirtualHost *:{% if site.host.port is defined %}{{ site.host.port }}{% else %}{% if site.ssl is defined %}443{% else %}80{% endif %}{% endif %}>
{%- include "apache/files/_name.conf" %}
{%- include "apache/files/_ssl.conf" %}
{%- include "apache/files/_log.conf" %}
DocumentRoot {{ root }}
<Directory {{ root }}>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
</Directory>
{%- if site.auth is defined %}
<Location />
{%- include "apache/files/_auth.conf" %}
</Location>
{%- endif %}
{%- include "apache/files/_locations.conf" %}
</VirtualHost>