Add http->http redirection for Matrix/Riot

Doing this means that matrix-nginx-proxy now starts
occupying port 80, which necessitates that
SSL renewal happens slightly differently.
This commit is contained in:
Slavi Pantaleev
2017-08-06 19:10:50 +03:00
parent 0d1a2071de
commit a3ecb7bfd9
5 changed files with 49 additions and 4 deletions

View File

@ -1,3 +1,19 @@
server {
listen 80;
server_name {{ hostname_riot }};
server_tokens off;
location /.well-known/acme-challenge {
default_type "text/plain";
alias /acmetool-certs/run/acme-challenge;
}
location / {
return 301 https://$http_host$request_uri;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;