{%- from "apache/map.jinja" import server with context -%} | |
{%- if site.robots is defined %} | |
<Location "/robots.txt"> | |
SetHandler None | |
</Location> | |
Alias /robots.txt {{ server.www_dir }}/{{ site_robots }}.txt | |
{%- endif %} | |
{%- if site.locations is defined %} | |
{%- for location in site.locations %} | |
{%- if location.script is defined and location.script %} | |
ScriptAlias {{ location.uri }} {{ location.path }} | |
{%- else %} | |
{%- if location.path is defined %} | |
Alias {{ location.uri }} {{ location.path }} | |
{%- endif %} | |
{%- endif %} | |
<Location {{ location.uri }}> | |
{%- if location.auth is defined%} | |
{%- set auth = location.auth %} | |
{%- include "apache/files/_auth.conf" %} | |
{%- else %} | |
AuthType none | |
Require all granted | |
{%- endif %} | |
{%- if location.webdav is defined %} | |
Dav {% if location.webdav.get('enabled', True) %}on{% else %}off{% endif %} | |
{%- endif %} | |
</Location> | |
{%- endfor %} | |
{%- endif %} |