需求: 使用 nginx 反代 wordpress,证书使用 Let's Encrypt,SSL 证书更新使用 acme.sh
问题: 使用 acme.sh 更新时,无法访问到.well-known 目录导致无法续期证书
试过指定以下配置,访问不到
location /.well-known {
root /path/to/web;
}
location /.well-known/ {
root /path/to/web;
}
location ~/.well-known {
root /path/to/web;
}
现有配置:
location / {
proxy_pass http://wordpress;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-proto https;
proxy_redirect off;
}
1
PerFectTime OP |
2
PerFectTime OP 精简一下似乎也是可以的
location /.well-known { try_files $uri $uri/ /; } location / { proxy_pass http://wordpress; } |