#957 nginx 容器 root 修复 - ai.qihuyun.com 显示 nginx 默认页

aiflow.conf 缺 server 级 root 指令导致 SPA fallback 走 nginx 默认 /usr/share/nginx/html. 修复后容器 8080 / host 12888 / 外部 ai.qihuyun.com 全部正确返回 544 bytes 七虎AI 前端页.
This commit is contained in:
qihu-bot committed 2026-08-11 08:55:49 +08:00
1 parent e58c37ea17
commit 53bbbf3195
2 files changed
+65 -1

No files matched your search

+5 -1
View File
@@ -14,6 +14,7 @@ include /etc/nginx/blocked_ips.conf;
server {
listen 8080 default_server;
server_name _;
root /app/frontend/dist;
client_max_body_size 100m;
client_body_timeout 30s;
@@ -53,8 +54,9 @@ server {
add_header Cache-Control "public, max-age=2592000";
}
# SPA fallback
# SPA fallback (root 是必须的,否则 nginx 会用默认 /usr/share/nginx/html 给出 welcome 页)
location / {
root /app/frontend/dist;
try_files $uri $uri/ /index.html;
}
@@ -128,3 +130,5 @@ server {