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不需要的域名证书的更多相关文章

  1. 高效率遍历Map以及在循环过程中移除 remove指定key

    //高效率遍历Map以及在循环过程中移除 remove指定key //使用iter循环的时候 可以在循环中移除key,for在循环的过程中移除会报错哦 //本方法效率高 Iterator iter = ...

  2. 免费SSL证书Let's Encrypt(certbot)安装使用教程

    免费SSL证书Let's Encrypt(certbot)安装使用教程 https://www.vpser.net/build/letsencrypt-certbot.html

  3. let's encrypt部署免费泛域名证书

    环境说明 [root@localhost ~]# cat /etc/redhat-release CentOS Linux release 7.5.1804 (Core) [root@localhos ...

  4. 基于Let's Encrypt生成免费证书-支持多域名泛域名证书

    目录 客户端 certbot acme.sh 安装acme.sh 1. 自动安装 2. 手动安装 3. 测试收否安装成功 使用acme.sh生成证书 1. HTTP 方式 2. DNS 方式 1. 生 ...

  5. CentOS 7配置Let’s Encrypt支持免费泛域名证书

    Let’s Encrypt从2018年开始支持泛域名证书,有效期3个月,目前仅支持acme方式申请,暂不支持certbot. 1.安装acme.sh curl https://get.acme.sh ...

  6. 申请 Let’s Encrypt 泛域名证书 及 Nginx/Apache 证书配置

    什么是 Let’s Encrypt? 部署 HTTPS 网站的时候需要证书,证书由 CA (Certificate Authority )机构签发,大部分传统 CA 机构签发证书是需要收费的,这不利于 ...

  7. Let's Encrypt免费泛域名证书申请

    一. 下载acme.sh,以下四条命令任选一条即可 curl https://get.acme.sh | shwget -O - https://get.acme.sh | sh curl https ...

  8. STL - 移除(remove)和释放(erase)集合元素

    remove(移除): 这个操作并不是真正地删除元素,它会移除指定的元素,然后后面的元素依次前移,最后用别的元素来补充. erase(释放): 这个操作会指定释放区间的头和尾迭代器(iterator) ...

  9. Java - ArrayList List 等迭代集合执行移除(remove) 的正确方法

    方法1: List<String> al = new ArrayList<String>(); Iterator<String> it = al.iterator( ...

随机推荐

  1. Python常用配置文件ini、json、yaml读写总结

    开发项目时,为了维护一些经常需要变更的数据,比如数据库的连接信息.请求的url.测试数据等,需要将这些数据写入配置文件,将数据和代码分离,只需要修改配置文件的参数,就可以快速完成环境的切换或者测试数据 ...

  2. C# 将json字符串进行排序 转成键值

    public static string StortJson(string json) { var dic = JsonConvert.DeserializeObject<SortedDicti ...

  3. esp-01与esp-01s的区别 ESP8288-01S与ESP8288-01的区别

    ESP8266系列Wi-Fi模块一共有01-14十多款模块, ESP8266-01简称ESP-01, ESP8266-01S简称ESP-01S 至于他们的区别请看下图:左边的是ESP8266-01S, ...

  4. VNC使用及其常见问题解决方法

    博主之前在博文(https://www.cnblogs.com/kangbazi666/p/14153604.html)中已经介绍了多人VNC的配置方法,下面将简单介绍其使用方法及常见问题的解决方法. ...

  5. Spring IOC 笔记

    什么是IOC与DI IOC(inversion of control) 它描述的其实是一种面向对象编程中的设计原则,用来降低代码之间的耦合度, 而DI(dependency Injection)依赖注 ...

  6. DML、DDL、DCL

    总体解释:DML(data manipulation language):       它们是SELECT.UPDATE.INSERT.DELETE,就象它的名字一样,这4条命令是用来对数据库里的数据 ...

  7. Node项目模板管理脚手架ptm-cli开发

    目录 一.ptm-cli 使用说明 1.特点 2.安装 3.使用 1)基础帮助命令 2)添加模板/项目 3)编辑模板/项目 4)查看模板/项目 5)删除模板/项目 6)基于模板新建/初始化项目 二 p ...

  8. hadoop fs -stat 查看文件状态

    转载来自:https://blog.csdn.net/knowledgeaaa/article/details/24394287 当向HDFS上写文件时,可以通过设置dfs.block.size配置项 ...

  9. linux系统操作系统网卡漂移解决方案及问题原因

    一.问题描述 公司有100-150台服务器安装RHEL7.4&中标麒麟7.4系统,为方便编辑配置网卡,使用脚本方式配置为biosname=0,ifname=0,目的是为将en1o2p此类长字符 ...

  10. Spring Boot -- 外部配置的属性使用

    Spring Boot允许使用propertities文件.yaml文件或者命令行参数作为外部配置. 命令行参数配置 Spring Boot可以基于jar包运行,打成jar包的程序可以直接通过下面的命 ...