blob: 93daa8eb35bad618bd2d2cb0f9a005b9b388cb84 [file] [log] [blame]
{%- set site = salt['pillar.get']('apache:server:site:'+site_name) %}
<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 %}
{%- if site.host.admin is defined %}
ServerAdmin {{ site.host.admin }}
{%- endif %}
ServerSignature Off
DocumentRoot /var/www
ProxyPass / {{ site.proxy.protocol }}://{{ site.proxy.host }}:{{ site.proxy.port }}/
{%- if site.get('ssl', {'enabled': False}).get('enabled', False) %}
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set Front-End-Https "On"
{%- endif %}
<Location / >
ProxyPassReverse {{ site.proxy.protocol }}://{{ site.proxy.host }}:{{ site.proxy.port }}/
<Limit OPTIONS PROPFIND GET REPORT MKACTIVITY PROPPATCH PUT CHECKOUT MKCOL MOVE COPY DELETE LOCK UNLOCK MERGE>
Order Deny,Allow
Allow from all
</Limit>
</Location>
</VirtualHost>