forked from linux/WebHosting
Reviewed-on: linux/WebHosting#18 Co-authored-by: Konrad Bucheli <konrad.bucheli@psi.ch> Co-committed-by: Konrad Bucheli <konrad.bucheli@psi.ch>
30 lines
860 B
Plaintext
30 lines
860 B
Plaintext
server {
|
|
listen 80;
|
|
server_name panda-maintenance.psi.ch;
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name panda-maintenance.psi.ch;
|
|
|
|
ssl_certificate /etc/nginx/certs/panda-maintenance.psi.ch.crt;
|
|
ssl_certificate_key /etc/nginx/private/panda-maintenance.psi.ch.key;
|
|
|
|
|
|
rewrite ^/$ /cmdbuild/ permanent;
|
|
location / {
|
|
return 404;
|
|
}
|
|
|
|
location /cmdbuild {
|
|
proxy_pass http://panda-maintenance-app:8080;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
# https://forum.cmdbuild.org/t/cmdbuild-behind-nginx-reverse-proxy/5070/3
|
|
add_header Content-Security-Policy upgrade-insecure-requests always;
|
|
}
|
|
}
|