ansible-config/roles/website/updates/templates/site.j2

54 lines
1.4 KiB
Plaintext
Raw Normal View History

2018-11-07 21:35:44 +01:00
{% if updates_tls_crt is defined %}
2017-02-10 22:51:55 +01:00
server {
2018-11-07 21:35:44 +01:00
server_name updates.hamburg.freifunk.net;
2017-02-10 22:51:55 +01:00
listen 443 ssl;
listen [::]:443 ssl;
2018-11-07 21:35:44 +01:00
ssl_certificate {{ updates_tls_crt }};
ssl_certificate_key {{ updates_tls_key }};
2017-02-10 22:51:55 +01:00
2018-11-07 21:35:44 +01:00
include snippets/header-hsts.conf;
2018-11-16 22:34:59 +01:00
include snippets/header-security.conf;
include snippets/no-unsafe-files.conf;
root {{ updates_root }};
2019-06-14 22:36:46 +02:00
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
fancyindex on;
fancyindex_name_length 120;
}
2017-02-10 22:51:55 +01:00
}
2017-10-03 17:30:06 +02:00
{% endif %}
# Kein HTTPS Redirect wg. Paketinstallation auf Routern
2017-02-10 22:51:55 +01:00
server {
2018-11-07 21:35:44 +01:00
server_name updates.hamburg.freifunk.net;
2017-02-10 22:51:55 +01:00
listen 80;
listen [::]:80;
2018-11-07 21:35:44 +01:00
include snippets/autoindex.conf;
2018-11-16 22:34:59 +01:00
include snippets/header-security.conf;
include snippets/no-unsafe-files.conf;
root {{ updates_root }};
2017-10-03 17:30:06 +02:00
2018-11-07 21:35:44 +01:00
{% if updates_letsencrypt == 'local' %}
include snippets/location-acme.conf;
{% elif updates_letsencrypt == 'srv01' %}
include snippets/location-acme-srv01.conf;
{% endif %}
2017-02-10 22:51:55 +01:00
}
server {
2019-06-14 22:36:46 +02:00
server_name updates-a.hamburg.freifunk.net updates-b.hamburg.freifunk.net;
2017-02-10 22:51:55 +01:00
listen 80;
listen [::]:80;
2018-11-07 21:35:44 +01:00
include snippets/autoindex.conf;
2018-11-16 22:34:59 +01:00
include snippets/header-security.conf;
include snippets/no-unsafe-files.conf;
root {{ updates_root }};
2017-02-10 22:51:55 +01:00
}