Remove location block from listing.conf

This commit is contained in:
Alexander Dietrich 2017-02-18 14:57:09 +01:00
parent 4c41b64426
commit 54120314b8
6 changed files with 27 additions and 26 deletions

View file

@ -0,0 +1,4 @@
# Header bitte nur auf "location" Ebene inkludieren:
# https://nginx.org/en/docs/http/ngx_http_headers_module.html#add_header
add_header Strict-Transport-Security max-age=31536000;

View file

@ -1,5 +1,3 @@
location / {
autoindex on;
autoindex_exact_size on;
autoindex_localtime off;
}

View file

@ -5,9 +5,11 @@ server {
include /etc/nginx/include/no_symlinks.conf;
{% if listing %}
location / {
include /etc/nginx/include/listing.conf;
{% endif %}
}
{% endif %}
listen {{port.number}}{% if port.ssl %} ssl{% endif %};
listen [::]:{{port.number}}{% if port.ssl %} ssl{% endif %};

View file

@ -1,9 +0,0 @@
# Basis-Konfiguration für updates.
root /var/www/updates;
location / {
access_log off;
log_not_found off;
autoindex on;
}

View file

@ -1,10 +1,4 @@
---
- name: copy updates_common.conf
copy:
src: files/updates_common.conf
dest: /etc/nginx/include
notify: reload nginx
- name: template site
template:
src: templates/site.j2

View file

@ -7,18 +7,26 @@ server {
ssl_certificate {{ updates_ssl_certificate }};
ssl_certificate_key {{ updates_ssl_certificate_key }};
include /etc/nginx/include/updates_common.conf;
root /var/www/updates;
location / {
include /etc/nginx/include/headers_hsts.conf;
include /etc/nginx/include/listing.conf;
}
}
# Kein HTTPS Redirect wg. Paketinstallation auf Routern
server {
listen 80;
listen [::]:80;
server_name updates.hamburg.freifunk.net;
include /etc/nginx/include/updates_common.conf;
root /var/www/updates;
# Kein HTTPS Redirect wg. Paketinstallation auf Routern
location / {
include /etc/nginx/include/listing.conf;
}
}
server {
@ -27,5 +35,9 @@ server {
server_name 1.updates.services.ffhh;
include /etc/nginx/include/updates_common.conf;
root /var/www/updates;
location / {
include /etc/nginx/include/listing.conf;
}
}