fix(nginx): fix admin SPA routing fallback to correct index.html
try_files 的最后一项 /index.html 会落到 web-client 的根 index.html, 导致 /admin/* 子路由(如 /admin/knowledge)加载 web-client 而非 admin-client。 修改为 /admin/index.html 以正确返回管理后台的 SPA 入口。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e16ec7930d
commit
fc9e0cd17b
|
|
@ -41,7 +41,7 @@ server {
|
|||
location /admin {
|
||||
alias /usr/share/nginx/html/admin;
|
||||
index index.html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
try_files $uri $uri/ /admin/index.html;
|
||||
|
||||
# 缓存静态资源
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||||
|
|
|
|||
Loading…
Reference in New Issue