From b72ec4e5a23b75bee4de33c98d7990231e16d19c Mon Sep 17 00:00:00 2001 From: txai-dev Date: Sun, 13 Sep 2026 00:31:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20admin=20nginx=20=E5=AE=B9=E5=99=A8?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=EF=BC=88dist=20=E5=9C=A8=E6=A0=B9=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=EF=BC=8C/admin/=20=E5=89=8D=E7=BC=80=20rewrite?= =?UTF-8?q?=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, 6 insertions(+), 3 deletions(-) diff --git a/deploy/nginx/admin.conf b/deploy/nginx/admin.conf index d478d4f..7e2262f 100644 --- a/deploy/nginx/admin.conf +++ b/deploy/nginx/admin.conf @@ -3,11 +3,14 @@ server { server_name _; root /usr/share/nginx/html; index index.html; + + location = / { return 302 /admin/; } location /admin/ { - try_files $uri $uri/ /admin/index.html; + rewrite ^/admin/(.*)$ /$1 last; + } + location / { + try_files $uri $uri/ /index.html; } - location = /admin { return 301 /admin/; } - location = / { return 301 /admin/; } location ~* \.(js|css|png|jpg|svg|woff2?)$ { expires 30d; add_header Cache-Control "public, immutable";