2021-03-14 11:20:09 +01:00
|
|
|
{% extends "core.j2" %}
|
|
|
|
|
|
|
|
{% block root %}
|
|
|
|
root {{ nginx_www_dir }}{{ item.root }};
|
|
|
|
index {{ item.index }};
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block location %}
|
|
|
|
location / {
|
|
|
|
try_files {{ item.override_try_files | default('$uri $uri/ =404') }};
|
2021-04-09 17:15:21 +02:00
|
|
|
}
|
2021-03-14 11:20:09 +01:00
|
|
|
{% endblock %}
|
|
|
|
{% block app_root_location %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block extra_locations %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block custom_locations %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block local_content %}
|
|
|
|
{% if item.manage_local_content is not defined %}
|
|
|
|
# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
|
|
|
|
# Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
|
|
|
|
location ~ /\. {
|
|
|
|
deny all;
|
|
|
|
}
|
|
|
|
|
|
|
|
{% if item.favicon is defined %}
|
|
|
|
location /favicon.ico {
|
|
|
|
alias {{ item.favicon }};
|
|
|
|
expires 30d;
|
|
|
|
access_log off;
|
|
|
|
log_not_found off;
|
|
|
|
}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
location ~* \.(txt|js|css|png|jpe?g|gif|ico|svg)$ {
|
|
|
|
expires 30d;
|
|
|
|
log_not_found off;
|
|
|
|
}
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
|