37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_name draw.louiscreates.com;
|
|
|
|
# Frontend static build
|
|
root /var/www/excalidash;
|
|
index index.html;
|
|
|
|
# SPA routing
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# API reverse proxy (Express mounted at /api)
|
|
location /api/ {
|
|
proxy_pass http://127.0.0.1:6768/api/;
|
|
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;
|
|
}
|
|
|
|
# Socket.IO websocket/polling endpoint
|
|
location /api/socket.io/ {
|
|
proxy_pass http://127.0.0.1:6768/api/socket.io/;
|
|
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 600s;
|
|
}
|
|
}
|