2018-11-03 00:00:16 +01:00
|
|
|
{% if hopglass_frontend_tls_crt is defined %}
|
|
|
|
server {
|
2018-11-05 21:30:34 +01:00
|
|
|
server_name map.hamburg.freifunk.net hopglass.hamburg.freifunk.net;
|
2018-11-03 00:00:16 +01:00
|
|
|
listen 443 ssl;
|
|
|
|
listen [::]:443 ssl;
|
|
|
|
ssl_certificate {{ hopglass_frontend_tls_crt }};
|
|
|
|
ssl_certificate_key {{ hopglass_frontend_tls_key }};
|
|
|
|
|
2018-11-10 14:39:10 +01:00
|
|
|
include snippets/header-hsts.conf;
|
2018-11-16 22:34:59 +01:00
|
|
|
include snippets/header-security.conf;
|
2018-11-10 14:39:10 +01:00
|
|
|
include snippets/no-unsafe-files.conf;
|
2018-11-03 00:00:16 +01:00
|
|
|
|
|
|
|
root {{ hopglass_frontend_path }}/build;
|
|
|
|
}
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
server {
|
2018-11-05 21:30:34 +01:00
|
|
|
server_name map.hamburg.freifunk.net hopglass.hamburg.freifunk.net;
|
2018-11-03 00:00:16 +01:00
|
|
|
listen 80;
|
|
|
|
listen [::]:80;
|
|
|
|
|
|
|
|
{% if hopglass_frontend_tls_crt is defined %}
|
2018-11-16 22:34:59 +01:00
|
|
|
location / {
|
|
|
|
return 302 https://$host$request_uri;
|
|
|
|
}
|
2018-11-03 00:00:16 +01:00
|
|
|
{% else %}
|
2018-11-16 22:34:59 +01:00
|
|
|
include snippets/header-security.conf;
|
2018-11-10 14:39:10 +01:00
|
|
|
include snippets/no-unsafe-files.conf;
|
2018-11-03 00:00:16 +01:00
|
|
|
|
|
|
|
root {{ hopglass_frontend_path }}/build;
|
|
|
|
{% endif %}
|
2018-11-10 14:39:10 +01:00
|
|
|
|
|
|
|
include snippets/location-acme.conf;
|
2018-11-03 00:00:16 +01:00
|
|
|
}
|