我在Nginx中使用了Ubuntu16.04,并且在我的操作系统(Ubuntu16.04)上安装了Nginx,其中包括:
apt-get update -y
add-apt-repository ppa:certbot/certbot -y
apt-get update -y
apt-get upgrade python-certbot-nginx -y我设置了Nginx变量:
s_a="/etc/nginx/sites-available"
s_e="/etc/nginx/sites-available"我创建了一个基于以下变量的app conf:
sed "s/\${domain}/${1}/g" "~/${repo}/template_nginx_app" > "${s_a}/${domain}.conf"
ln -sf ${s_a}/${domain}.conf ${s_e}我使用Certbot创建了一个基于app conf的代理SSL证书,方法是:
certbot --nginx -d ${domain} -d www.${domain}在有些情况下,SSL证书是以不好的方式创建的,而且只需要在一些配置之后重新开始。
我如何才能完全删除SSL证书(除了删除应用程序conf ${domain}.conf之外,它也是由Certbot编辑/重新配置的)?
有一个快速的方法直接从Certbot做到这一点吗?我的愿望是,没有任何遗留下来的应用程序和证书。
这可能是个好办法:
rm ${s_a}/${domain}.conf && rm ${s_e}/${domain}.conf
rm -rf /etc/letsencrypt/{live,renewal,archive}/{${DOMAIN},${DOMAIN}.conf}发布于 2019-02-09 22:31:06
是的,certbot可以帮你打扫卫生。
sudo certbot certificates
将列出您认为已安装的certbot
sudo certbot delete
将允许您以交互方式删除和清除不需要的/不推荐的域。
发布于 2021-10-21 17:16:21
获取要删除的证书的名称
sudo certbot certificates只删除一个证书的名称
sudo certbot delete --cert-name server.domain.tld发布于 2021-05-25 12:19:38
如果您正在运行apache2,您还需要从conf文件中删除certbot引用,否则在添加新证书时certbot会感到困惑。
sudo certbot delete然后
emacs /etc/apache2/sites-enabled/000-default-le-ssl.conf 移除这些线
Include /etc/letsencrypt/options-ssl-apache.conf
ServerName example.com
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pemhttps://serverfault.com/questions/896711
复制相似问题