Files
wyndham-Condon/deploy/nginx.conf
2026-08-03 11:25:55 +08:00

36 lines
684 B
Nginx Configuration File

upstream condo_backend {
server backend:3000;
}
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location = /api {
return 308 /api/;
}
location /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;
proxy_set_header Connection "";
proxy_pass http://condo_backend/;
}
location / {
try_files $uri $uri/ /index.html;
}
location ~* \.(?:css|js|svg)$ {
expires 1h;
add_header Cache-Control "public";
try_files $uri =404;
}
}