- 添加 absolute_redirect off 配置,使 nginx 使用相对路径重定向 - 避免容器内端口 80 与外部端口 8080 不一致导致重定向失败
This commit is contained in:
+2
-1
@@ -1,6 +1,7 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
absolute_redirect off;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
@@ -38,7 +39,7 @@ server {
|
||||
}
|
||||
|
||||
# 根路径重定向到主简历
|
||||
location / {
|
||||
location = / {
|
||||
return 301 /resume/;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user