服务器问答
需求: 使用 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;
}