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

29 lines
633 B
Plaintext
Raw Permalink Normal View History

2018-11-07 22:22:57 +01:00
{% if media_tls_crt is defined %}
server {
server_name media.hamburg.freifunk.net;
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate {{ media_tls_crt }};
ssl_certificate_key {{ media_tls_key }};
include snippets/autoindex.conf;
include snippets/header-hsts.conf;
2018-11-16 22:34:59 +01:00
include snippets/header-security.conf;
2018-11-07 22:22:57 +01:00
include snippets/no-unsafe-files.conf;
2018-11-16 22:34:59 +01:00
root {{ media_root }};
2018-11-07 22:22:57 +01:00
}
{% endif %}
server {
server_name media.hamburg.freifunk.net;
listen 80;
listen [::]:80;
2018-11-16 22:34:59 +01:00
location / {
return 302 https://$server_name$request_uri;
}
2018-11-07 22:22:57 +01:00
include snippets/location-acme.conf;
}