fix: admin 容器 nginx 去掉静态正则 location(与 alias 冲突致 404)
This commit is contained in:
@@ -4,15 +4,12 @@ server {
|
|||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
location = / { return 302 /admin/; }
|
|
||||||
location /admin/ {
|
location /admin/ {
|
||||||
rewrite ^/admin/(.*)$ /$1 last;
|
alias /usr/share/nginx/html/;
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
|
location = /admin { return 302 /admin/; }
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
location ~* \.(js|css|png|jpg|svg|woff2?)$ {
|
|
||||||
expires 30d;
|
|
||||||
add_header Cache-Control "public, immutable";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user