This commit is contained in:
toom1996
2026-09-29 19:59:22 +08:00
parent b4fa41338b
commit 335e264e45
12 changed files with 143 additions and 103 deletions

View File

@ -2,12 +2,13 @@ server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# 前端静态资源 / SPA 回退
# 前端 node server(Astro standalone,同容器内 127.0.0.1:3000):承载 SSR 详情页 / 静态资源。
location / {
try_files $uri $uri/ /index.html;
proxy_pass http://127.0.0.1:3000;
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;
}
# 网关隔离:SSG 内部接口只存在于 backend 的 8091 端口(回环绑定,nginx 不反代)。