debian: update nginx-example.conf to redirect non-ssl requests (#22779)
This commit is contained in:
parent
f20ce6ecdc
commit
887c43cfc9
|
@ -38,21 +38,5 @@ server {
|
||||||
access_log /var/log/nginx/combo.example.org-access.log combined;
|
access_log /var/log/nginx/combo.example.org-access.log combined;
|
||||||
error_log /var/log/nginx/combo.example.org-error.log;
|
error_log /var/log/nginx/combo.example.org-error.log;
|
||||||
|
|
||||||
location ~ ^/static/(.+)$ {
|
return 302 https://$host$request_uri;
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue