Files
whale-town-end-v2/deploy/nginx/whaletownend-v2.conf.example

86 lines
2.5 KiB
Plaintext

server {
listen 80;
server_name whaletown.novamailio.com;
client_max_body_size 24m;
root /var/www/whale-town-end-v2/client/dist;
location = /admin {
return 301 /admin/;
}
location ^~ /admin/assets/ {
rewrite ^/admin/(.*)$ /$1 break;
try_files $uri =404;
expires 7d;
add_header Cache-Control "public, max-age=604800, immutable";
}
location /admin/ {
rewrite ^/admin/(.*)$ /$1 break;
try_files $uri $uri/ /index.html;
}
location = /index.html {
internal;
add_header Cache-Control "no-cache";
}
location /game {
proxy_pass http://127.0.0.1:3001/game;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header 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_read_timeout 3600s;
proxy_send_timeout 3600s;
}
location = /location-broadcast {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header 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_read_timeout 3600s;
proxy_send_timeout 3600s;
}
location = /ws/notice {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header 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_read_timeout 3600s;
proxy_send_timeout 3600s;
}
location = /api {
return 301 /api/;
}
location /api/ {
# The trailing slash strips the public /api prefix before Nest routing.
proxy_pass http://127.0.0.1:3000/;
proxy_http_version 1.1;
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;
}
location / {
return 302 /admin/;
}
}