debian: update nginx-example.conf to redirect non-ssl requests (#22779)

This commit is contained in:
Christophe Siraut 2018-03-23 18:19:06 +01:00 committed by Frédéric Péters
parent f20ce6ecdc
commit 887c43cfc9
1 changed files with 1 additions and 17 deletions

View File

@ -38,21 +38,5 @@ server {
access_log /var/log/nginx/combo.example.org-access.log combined;
error_log /var/log/nginx/combo.example.org-error.log;
location ~ ^/static/(.+)$ {
root /;
try_files /var/lib/combo/tenants/$host/static/$1
/var/lib/combo/collectstatic/$1
=404;
}
location ~ ^/media/(.+)$ {
alias /var/lib/combo/tenants/$host/media/$1;
}
location / {
proxy_pass http://unix:/var/run/combo/combo.sock;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
return 302 https://$host$request_uri;
}