From 430d125a1831f056ecda4d2f1c3a1424ad7fba91 Mon Sep 17 00:00:00 2001 From: txai-dev Date: Sun, 13 Sep 2026 00:32:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20admin=20=E5=AE=B9=E5=99=A8=20nginx=20?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E9=9D=99=E6=80=81=E6=AD=A3=E5=88=99=20locati?= =?UTF-8?q?on=EF=BC=88=E4=B8=8E=20alias=20=E5=86=B2=E7=AA=81=E8=87=B4=2040?= =?UTF-8?q?4=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/nginx/admin.conf | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/deploy/nginx/admin.conf b/deploy/nginx/admin.conf index 7e2262f..8fc4f17 100644 --- a/deploy/nginx/admin.conf +++ b/deploy/nginx/admin.conf @@ -4,15 +4,12 @@ server { root /usr/share/nginx/html; index index.html; - location = / { return 302 /admin/; } location /admin/ { - rewrite ^/admin/(.*)$ /$1 last; + alias /usr/share/nginx/html/; + try_files $uri $uri/ /index.html; } + location = /admin { return 302 /admin/; } location / { try_files $uri $uri/ /index.html; } - location ~* \.(js|css|png|jpg|svg|woff2?)$ { - expires 30d; - add_header Cache-Control "public, immutable"; - } }