Nginx-Configurations/http.d/dash.shad.moe
2024-11-04 17:09:00 +00:00

41 lines
1.1 KiB
Text

map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
listen [::]:80;
server_name dash.shad.moe www.dash.shad.moe;
if ($host = dash.shad.moe) {
return 301 https://$host$request_uri;
}
return 404;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
server_name dash.shad.moe www.dash.shad.moe;
ssl_certificate /etc/letsencrypt/live/dash.shad.moe/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/dash.shad.moe/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
client_max_body_size 525M;
include snippets/http-cat-error-pages.conf;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
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;
proxy_pass http://192.168.1.210:3000;
}
}