Files
me-web/nginx.conf
T
Superuser ff98547dbb init: me-web 个人简历前端
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 20:10:54 +08:00

29 lines
649 B
Nginx Configuration File

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# SPA fallback
location / {
try_files $uri $uri/ /index.html;
}
# API proxy to backend
location /api/ {
proxy_pass http://me-api: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;
}
# Static assets cache
location /assets/ {
expires 1y;
add_header Cache-Control "public, immutable";
}
}