Lets Encrypt:使用 certbot 修复损坏的证书
Lets Encrypt: repair broken certificate with certbot
如果配置损坏,我如何 运行 certbot 重新颁发特定(或所有)证书。例如。如果文件夹 letsencrypt/live
的内容被意外删除。
使用 renew
我得到一个错误并且 certbot 跳过。有没有像 force-reinstall-if-broken
这样的选项?
在实际配置中使用 certbot certonly
应该可以。
certbot certonly --config /path/to/config.conf
作为 config.conf
像这样的 Letsencrypt 配置文件:
domains = url.com, www.url.com
rsa-key-size = 4096
# the current closed beta (as of 2015-Nov-07) is using this server
server = https://acme-v01.api.letsencrypt.org/directory
email = user@email.com
text = True
# authenticate by placing a file in the webroot (under .well-known/acme-challenge/)
# and then letting LE fetch it
authenticator = webroot
webroot-path = /path/to/webroot
请注意,我正在使用 webroot
插件生成证书,因此我可以避免服务器停机。
在编写脚本来创建和自动化我的证书时,我不得不多次重新颁发证书,这个命令对我很有效,无需删除任何额外内容。
如果您仍然遇到问题,请尝试将 renew
中的 link 符号化到您服务器的最新 .pem
证书档案:
lrwxrwxrwx 1 root root 38 mar 11 01:02 cert.pem -> ../../archive/[SERVER]/cert8.pem
lrwxrwxrwx 1 root root 39 mar 11 01:02 chain.pem -> ../../archive/[SERVER]/chain8.pem
lrwxrwxrwx 1 root root 43 mar 11 01:02 fullchain.pem -> ../../archive/[SERVER]/fullchain8.pem
lrwxrwxrwx 1 root root 41 mar 11 01:02 privkey.pem -> ../../archive/[SERVER]/privkey8.pem
certbot 证书
找到您要重新安装的全链证书的路径
certbot revoke --cert-path /etc/letsencrypt/live/...
上面的证书路径
certbot delete --cert-name yourdomain.com
rm -Rf /etc/apache2/sites-available/000-default-le-ssl.conf
或者你在
上配置的任何 apache conf 的名称
rm -Rf 000-default-le-ssl.conf
或者你在
上配置的任何 apache conf 的名称
sudo apache2ctl restart
certbot
按照指南设置新证书
如果配置损坏,我如何 运行 certbot 重新颁发特定(或所有)证书。例如。如果文件夹 letsencrypt/live
的内容被意外删除。
使用 renew
我得到一个错误并且 certbot 跳过。有没有像 force-reinstall-if-broken
这样的选项?
在实际配置中使用 certbot certonly
应该可以。
certbot certonly --config /path/to/config.conf
作为 config.conf
像这样的 Letsencrypt 配置文件:
domains = url.com, www.url.com
rsa-key-size = 4096
# the current closed beta (as of 2015-Nov-07) is using this server
server = https://acme-v01.api.letsencrypt.org/directory
email = user@email.com
text = True
# authenticate by placing a file in the webroot (under .well-known/acme-challenge/)
# and then letting LE fetch it
authenticator = webroot
webroot-path = /path/to/webroot
请注意,我正在使用 webroot
插件生成证书,因此我可以避免服务器停机。
在编写脚本来创建和自动化我的证书时,我不得不多次重新颁发证书,这个命令对我很有效,无需删除任何额外内容。
如果您仍然遇到问题,请尝试将 renew
中的 link 符号化到您服务器的最新 .pem
证书档案:
lrwxrwxrwx 1 root root 38 mar 11 01:02 cert.pem -> ../../archive/[SERVER]/cert8.pem
lrwxrwxrwx 1 root root 39 mar 11 01:02 chain.pem -> ../../archive/[SERVER]/chain8.pem
lrwxrwxrwx 1 root root 43 mar 11 01:02 fullchain.pem -> ../../archive/[SERVER]/fullchain8.pem
lrwxrwxrwx 1 root root 41 mar 11 01:02 privkey.pem -> ../../archive/[SERVER]/privkey8.pem
certbot 证书
找到您要重新安装的全链证书的路径
certbot revoke --cert-path /etc/letsencrypt/live/...
上面的证书路径
certbot delete --cert-name yourdomain.com
rm -Rf /etc/apache2/sites-available/000-default-le-ssl.conf
或者你在
rm -Rf 000-default-le-ssl.conf
或者你在
sudo apache2ctl restart
certbot
按照指南设置新证书