fix: 修复 status 站点 80 端口重定向写法,certbot 证书签发成功

This commit is contained in:
2026-08-27 00:56:28 +08:00
parent bdffcee0ee
commit 60b9ce1866
3 changed files with 28 additions and 7 deletions
+5 -1
View File
@@ -12,7 +12,11 @@ server {
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
return 301 https://$host$request_uri;
# 注意:301 必须放在 location / 内,server 级 return 会在 location 匹配前执行,
# 导致 ACME 挑战路径也被重定向(踩坑记录见 setup.md)
location / {
return 301 https://$host$request_uri;
}
}
server {