ssl - 更改已注册 letsencrypt 证书的 webroot 路径

标签 ssl nginx lets-encrypt

我是 Let's Encrypt 证书的新手。我按照此命令在 digitalocean.com 为 nginx 服务器注册了我的域

cd /opt/letsencrypt ./letsencrypt-auto certonly -a webroot --webroot-path=/usr/share/nginx/html -d mydomain.com -d www.mydomain.com

而且效果很好。然后我将我的域的webroot 路径 更改为/var/www/xxx。 现在,当我尝试更新我的 letsencrypt 证书时出现错误。 然后我回滚我的 webroot 路径,再试一次,更新工作完美。 现在我的问题是如何更改我为 Let's Encrypt 注册的 webroot-path

最佳答案

在/etc/letsencrypt/renewal/mydomain.conf 中更改它

设置

authenticator = webroot
webroot_path=/var/www/xxx/

我花了好几个小时才弄明白的关键时刻 - 使用 webroot_path=/var/www/xxx/ 而不是 webroot-path=/var/www/xxx 配置 webrooth 路径,注意下划线

关于ssl - 更改已注册 letsencrypt 证书的 webroot 路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37960696/

相关文章:

macos - 我在哪里可以获得一捆中间证书?

ssl - AWS 上的 Kubernetes : Preserving Client IP with nginx-ingress + cert-manager

apache - 如何在多个端口(tcp 和 udp)上设置反向代理

docker - 带有 cloudflare SSL 的 jwilder/nginx-proxy 没有

linux - 来自 Apache http/.well-known/acme-challenge 的无效响应

ssl - asn1 go(客户端证书授权)

Android 在测试期间信任自签名证书

docker - 将 docker nginx 访问日志存储在 docker 卷内

lets-encrypt - 我如何告诉 Caddy 使用哪个子域

android - 使用自定义 TrustManager 的 Android 中的 SSL 网站证书不受信任