update nginx conf, try auto apply .html to uri
All checks were successful
Build NGINX on Ubuntu / build-and-deploy (push) Successful in 1m11s
All checks were successful
Build NGINX on Ubuntu / build-and-deploy (push) Successful in 1m11s
This commit is contained in:
parent
9d66348232
commit
30ae89715c
@ -50,9 +50,13 @@ data:
|
||||
listen 8080; # 修改为非特权端口
|
||||
server_name localhost;
|
||||
|
||||
# 添加重写规则 - 如果请求不带扩展名且不存在对应目录,尝试添加.html后缀
|
||||
location / {
|
||||
root /usr/local/nginx/html;
|
||||
index index.html index.htm;
|
||||
|
||||
# 首先尝试完全匹配,然后尝试添加.html扩展名,最后回退到index
|
||||
try_files $uri $uri.html $uri/ /index.html;
|
||||
}
|
||||
|
||||
# 健康检查端点
|
||||
|
Loading…
x
Reference in New Issue
Block a user