Remove location block from listing.conf
This commit is contained in:
parent
4c41b64426
commit
54120314b8
4
roles/nginx/files/etc/nginx/include/headers_hsts.conf
Normal file
4
roles/nginx/files/etc/nginx/include/headers_hsts.conf
Normal 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;
|
|
@ -1,5 +1,3 @@
|
||||||
location / {
|
autoindex on;
|
||||||
autoindex on;
|
autoindex_exact_size on;
|
||||||
autoindex_exact_size on;
|
autoindex_localtime off;
|
||||||
autoindex_localtime off;
|
|
||||||
}
|
|
||||||
|
|
|
@ -4,10 +4,12 @@ server {
|
||||||
include /etc/nginx/include/no_dotfiles.conf;
|
include /etc/nginx/include/no_dotfiles.conf;
|
||||||
include /etc/nginx/include/no_symlinks.conf;
|
include /etc/nginx/include/no_symlinks.conf;
|
||||||
|
|
||||||
{% if listing %}
|
{% if listing %}
|
||||||
|
location / {
|
||||||
include /etc/nginx/include/listing.conf;
|
include /etc/nginx/include/listing.conf;
|
||||||
{% endif %}
|
}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
listen {{port.number}}{% if port.ssl %} ssl{% endif %};
|
listen {{port.number}}{% if port.ssl %} ssl{% endif %};
|
||||||
listen [::]:{{port.number}}{% if port.ssl %} ssl{% endif %};
|
listen [::]:{{port.number}}{% if port.ssl %} ssl{% endif %};
|
||||||
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
# Basis-Konfiguration für updates.
|
|
||||||
|
|
||||||
root /var/www/updates;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
access_log off;
|
|
||||||
log_not_found off;
|
|
||||||
autoindex on;
|
|
||||||
}
|
|
|
@ -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
|
- name: template site
|
||||||
template:
|
template:
|
||||||
src: templates/site.j2
|
src: templates/site.j2
|
||||||
|
|
|
@ -7,18 +7,26 @@ server {
|
||||||
ssl_certificate {{ updates_ssl_certificate }};
|
ssl_certificate {{ updates_ssl_certificate }};
|
||||||
ssl_certificate_key {{ updates_ssl_certificate_key }};
|
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 {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
|
|
||||||
server_name updates.hamburg.freifunk.net;
|
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 {
|
server {
|
||||||
|
@ -27,5 +35,9 @@ server {
|
||||||
|
|
||||||
server_name 1.updates.services.ffhh;
|
server_name 1.updates.services.ffhh;
|
||||||
|
|
||||||
include /etc/nginx/include/updates_common.conf;
|
root /var/www/updates;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
include /etc/nginx/include/listing.conf;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue