https redirect status page

This commit is contained in:
Simon Larsen 2023-01-02 10:15:11 +00:00
parent 1c062a4a39
commit 61b27ea8c3
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE

View File

@ -34,9 +34,41 @@ upstream mail {
server mail:3190 weight=10 max_fails=3 fail_timeout=30s;
}
server {
listen 80 default_server;
server_name _; # All domains.
proxy_busy_buffers_size 512k;
proxy_buffers 4 512k;
proxy_buffer_size 256k;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
location / {
return 301 https://$host$request_uri;
}
location /status-page {
return 301 https://$host$request_uri;
}
location /status-page-api {
proxy_pass http://dashboard-api/api/status-page/status-page-api;
}
# Acme Verification.
location /.well-known {
proxy_pass http://dashboard-api/api/status-page/.well-known;
}
}
server {
listen 443 default_server ssl; # Port HTTPS
@ -82,36 +114,6 @@ server {
proxy_pass http://status-page;
}
location /status-page-api {
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;
# enable WebSockets (for ws://sockjs not connected error in the accounts source: https://stackoverflow.com/questions/41381444/websocket-connection-failed-error-during-websocket-handshake-unexpected-respon)
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://dashboard-api/api/status-page/status-page-api;
}
# Acme Verification.
location /.well-known {
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;
# enable WebSockets (for ws://sockjs not connected error in the accounts source: https://stackoverflow.com/questions/41381444/websocket-connection-failed-error-during-websocket-handshake-unexpected-respon)
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://dashboard-api/api/status-page/.well-known;
}
}
server {