Files
2026-07-13 13:32:32 +08:00

28 lines
661 B
Nginx Configuration File

server {
listen 3000;
root /usr/share/nginx/html;
index index.html;
resolver 127.0.0.11 ipv6=off valid=30s;
set $backend_upstream backend:8000;
location / {
try_files $uri $uri/ /index.html;
}
location /api/ {
proxy_pass http://$backend_upstream;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /ws {
proxy_pass http://$backend_upstream;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_read_timeout 86400;
}
}