Let’s Encrypt/Certbot移除/remove/revoke不需要的域名证书
1.首先确认你的证书不再需要,如果有必要,请执行下面的命令进行备份
cp /etc/letsencrypt/ /etc/letsencrypt.backup -r
2.撤销证书然后删除证书
[root@localhost certbot-0.34.2]# certbot revoke ####这个是撤销命令,执行这命令下面会报错要让我指定变量位置
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Error! Exactly one of --cert-path or --cert-name must be specified!
You have new mail in /var/spool/mail/root
[root@localhost certbot-0.34.2]# certbot revoke --cert-path /etc/letsencrypt/archive/pazzn.com/c
cert1.pem cert2.pem chain1.pem chain2.pem
[root@localhost certbot-0.34.2]# certbot revoke --cert-path /etc/letsencrypt/archive/pazzn.com/cert
cert1.pem cert2.pem
[root@localhost certbot-0.34.2]# certbot revoke --cert-path /etc/letsencrypt/archive/pazzn.com/cert1.pem ###撤销这个cert1.pem证书,一般默认都是我这个位置
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you like to delete the cert(s) you just revoked, along with all earlier
and later versions of the cert?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es (recommended)/(N)o: y ##确定撤销
[root@localhost certbot-0.34.2]# certbot delete ###删除证书
Saving debug log to /var/log/letsencrypt/letsencrypt.log Which certificate(s) would you like to delete?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: pazzn.com-0001
2: pazzn.com-0002
3: pazzn.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Deleted all files relating to certificate pazzn.com-0001.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
You have new mail in /var/spool/mail/root
[root@localhost certbot-0.34.2]# certbot delete
Saving debug log to /var/log/letsencrypt/letsencrypt.log Which certificate(s) would you like to delete?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: pazzn.com-0002
2: pazzn.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Deleted all files relating to certificate pazzn.com-0002.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[root@localhost certbot-0.34.2]# certbot delete
Saving debug log to /var/log/letsencrypt/letsencrypt.log Which certificate(s) would you like to delete?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: pazzn.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Deleted all files relating to certificate pazzn.com.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[root@localhost certbot-0.34.2]# certbot delete ###删除完后再次执行就会说没有证书文件了,根据自己需要删除域名指定证书
Saving debug log to /var/log/letsencrypt/letsencrypt.log
No existing certificates found.
[root@localhost certbot-0.34.2]# certbot revoke
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Error! Exactly one of --cert-path or --cert-name must be specified!
You have new mail in /var/spool/mail/root
3.弄完证书后还得删除在nginx.conf配置文件中的ssl配置内容,不然没有了证书,一般就报404什么的了,所以一定要删除
删除后记得重启nginx服务,网页就撤销证书了。
[root@localhost ~]# systemctl restart nginx.service
[root@localhost ~]#
最后如图已经撤销:
参考链接:https://www.jesusamieiro.com/remove-revoke-a-domain-in-lets-encrypt/
Let’s Encrypt/Certbot移除/remove/revoke不需要的域名证书的更多相关文章
- 高效率遍历Map以及在循环过程中移除 remove指定key
//高效率遍历Map以及在循环过程中移除 remove指定key //使用iter循环的时候 可以在循环中移除key,for在循环的过程中移除会报错哦 //本方法效率高 Iterator iter = ...
- 免费SSL证书Let's Encrypt(certbot)安装使用教程
免费SSL证书Let's Encrypt(certbot)安装使用教程 https://www.vpser.net/build/letsencrypt-certbot.html
- let's encrypt部署免费泛域名证书
环境说明 [root@localhost ~]# cat /etc/redhat-release CentOS Linux release 7.5.1804 (Core) [root@localhos ...
- 基于Let's Encrypt生成免费证书-支持多域名泛域名证书
目录 客户端 certbot acme.sh 安装acme.sh 1. 自动安装 2. 手动安装 3. 测试收否安装成功 使用acme.sh生成证书 1. HTTP 方式 2. DNS 方式 1. 生 ...
- CentOS 7配置Let’s Encrypt支持免费泛域名证书
Let’s Encrypt从2018年开始支持泛域名证书,有效期3个月,目前仅支持acme方式申请,暂不支持certbot. 1.安装acme.sh curl https://get.acme.sh ...
- 申请 Let’s Encrypt 泛域名证书 及 Nginx/Apache 证书配置
什么是 Let’s Encrypt? 部署 HTTPS 网站的时候需要证书,证书由 CA (Certificate Authority )机构签发,大部分传统 CA 机构签发证书是需要收费的,这不利于 ...
- Let's Encrypt免费泛域名证书申请
一. 下载acme.sh,以下四条命令任选一条即可 curl https://get.acme.sh | shwget -O - https://get.acme.sh | sh curl https ...
- STL - 移除(remove)和释放(erase)集合元素
remove(移除): 这个操作并不是真正地删除元素,它会移除指定的元素,然后后面的元素依次前移,最后用别的元素来补充. erase(释放): 这个操作会指定释放区间的头和尾迭代器(iterator) ...
- Java - ArrayList List 等迭代集合执行移除(remove) 的正确方法
方法1: List<String> al = new ArrayList<String>(); Iterator<String> it = al.iterator( ...
随机推荐
- python按位操作以及进制转换
a = raw_input() b = raw_input() c1 = int(str(a), 2)#2进制转化为10进制 c2 = int(str(b), 2) c = c1 ^ c2#按位异或 ...
- Windows安装VsCode 和Nodejs Vue
一.安装VSCode 1.在官网下载并安装VSCode https://code.visualstudio.com/Download 注意:解压到非系统盘(节约系统盘空间,也方便后面使用) 文件夹最好 ...
- asp.net webapi 给字段赋初始值DefaultValue 解决前端传空字符串后台接受不是“”而是NULL
/// <summary> /// 存储ID /// </summary> public Guid SaveID { get; set; } /// <summary&g ...
- springboot(一)入门篇
作者:纯洁的微笑 出处:www.ityouknow.com 版权所有,欢迎保留原文链接进行转载:) 根据原文以下内容略有调整(由于SpringBoot版本更新引起) 什么是spring boot Sp ...
- python在线练习
不管学习那门语言都希望能做出实际的东西来,这个实际的东西当然就是项目啦,不用多说大家都知道学编程语言一定要做项目才行. 这里整理了70个Python实战项目列表,都有完整且详细的教程,你可以从中选择自 ...
- linkedhashmap中关于LRU算法的实现
//LinkedHashMap的一个构造函数,当参数accessOrder为true时,即会按照访问顺序排序,最近访问的放在最前,最早访问的放在后面 public LinkedHashMap(int ...
- linux hosts_access
linux hosts_access 概要 tcp连接的访问控制功能,通过libwrap提供,即编译到代码里的访问控制功能 可以通过ldd 命令查看程序是否链接了libwrap库 主要根据程序名称,以 ...
- hive行转列,列转行
实例一:来源: https://www.cnblogs.com/kimbo/p/6208973.html 行转列 (对某列拆分,一列拆多行) 使用函数:lateral view explode(spl ...
- 风炫安全web安全学习第三十七节课 15种上传漏洞讲解(二)
风炫安全web安全学习第三十七节课 15种上传漏洞讲解(二) 05后缀名黑名单校验之上传.htaccess绕过 还是使用黑名单,禁止上传所有web容器能解析的脚本文件的后缀 $is_upload = ...
- 风炫安全web安全学习第三十三节课 文件包含漏洞基础以及利用伪协议进行攻击
风炫安全web安全学习第三十三节课 文件包含漏洞基础以及利用伪协议进行攻击 文件包含漏洞 参考文章:https://chybeta.github.io/2017/10/08/php文件包含漏洞/ 分类 ...