(Let’s Encrypt) certbot 删除证书的方法

作者

Let’s Encrypt是互联网安全研究小组推出的免费的安全证书计划。 cerbbot是该计划下的一个管理证书的工具。创建证书的时候,使用命令 certbot certonly, 删除证书的时候更简单输入 certbot delete 然后选择对应的编号即可。

certbot的证书支持多个子域名。比如同时支持 https://www.liuhaolin.com 和 https://liuhaolin.com 两种方式访问。如果想加上一个不带www的域名证书,可以删除之前的证书,从新生成一个即可。

certbot证书
certbot证书

cerbot delete 删除证书

certbot delete
Saving debug log to /var/log/letsencrypt/letsencrypt.log

Which certificate(s) would you like to delete?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: liuhaolin.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel):

重新生成新的证书

certbot certonly --webroot  -d liuhaolin.com -d www.liuhaolin.com   -w /website/mysite --register-unsafely-without-email

然后重新启动web服务器即可。

certbot更新后的证书
certbot更新后的证书

回复

您的电子邮箱地址不会被公开。