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利用pandas处理数据后画图
pandas要处理的数据是一个数据表格.代码: 1 import pandas as pd 2 import numpy as np 3 import matplotlib.pyplot as plt ...
- 使用aspnet_compiler对web程序进行预编译
前言 本例使用的是asp.net中的webform项目,使用.net框架为.net3.5 操作步骤 正常的web项目发布步骤 发布方法:文件系统 目标位置:发布后的项目文件的路径,可自定义. 打开wi ...
- CentOS8更换国内YUM源
rm -rf /etc/yum.repos.d/* wget -O /etc/yum.repos.d/CentOS-cnnic.repo https://feieryun.oss-cn-zhangji ...
- .net网站快速停机设置app_offline
在根目录防止一个app_offline.htm文件即可,文件内容自己设置,空白也是可以的,这样的话网站即可实现快速停机,方便维护和升级 有问题可以联系我,我的邮箱是:yxxrui@163.com,我的 ...
- ava基础MySQL存储过程 Java基础 JDBC连接MySQL数据库
1.MySQL存储过程 1.1.什么是存储过程 带有逻辑的sql语句:带有流程控制语句(if while)等等 的sql语句 1.2.存储过程的特点 1)执行效率非常快,存储过程是数据库的服 ...
- Idea mybatis maper接口与mapper.xml文件关联 会根据接口中的方法点在mxl中生成相应sql方法
- OJDBC版本区别
classes12.jar,ojdbc14.jar,ojdbc5.jar和ojdbc6.jar,ojdbc7.jar的区别与差异 [转 原文:https://yq.aliyun.com/wenji/2 ...
- 常用的Git命令清单
目录 名词解释 开卷必读 一. 新建代码库 二.配置 三. 忽略某个文件的改动 四. 增加/删除文件 五. 代码提交 六. 分支 七. 标签 八. 查看信息 九. 远程同步 十. 撤销 十一. Git ...
- .Net微服务实战之负载均衡(下)
系列文章 .Net微服务实战之技术选型篇 .Net微服务实战之技术架构分层篇 .Net微服务实战之DevOps篇 .Net微服务实战之负载均衡(上) .Net微服务实战之CI/CD .Net微服务实战 ...
- 第9章 集合处理(数组、Map、Set)
目录 1. 数组 1.1 创建数组 1.2 在数组两端添加删除元素 1.3 在数组任意位置添加.删除元素 delete删除数组元素无效 使用splice方法增.删.改元素 1.4 数组的常用操作 数组 ...