删除旧域 Certbot certificates (让我们加密证书)

一个简单的教程解决 administrator想要从中删除的 Web 服务器 Certbot 证书 SSL 不再托管在服务器上的域。 删除旧域 certbot certificates.

Certbot 是许多人使用的开源软件 administrator和系统开启 CentOS / RHEL 用于证书管理 HTTPS / TLS / SSL 让我们加密.

歌剧院 certbot 是通过 命令行 直接在网络服务器中执行(SSH 或控制台连接),以及 安装证书 将域/子域托管在该服务器上并在服务器 IP 上的 Internet 上处于活动状态就足够了。 执行命令后“certbot”将以数字形式列出服务器上托管的所有域,我们可以为其安装 Let's Encrypt 证书。 我们在它们之间键入与将为其安装证书的每个域名对应的数字 SSL.

删除旧域 certbot certificates
Certbot 域名

一个小问题是当一个安装了证书的域从网络服务器中删除时 Certbot. 它将在我们验证证书有效期的顺序上进一步列出 SSL 适用于所有领域。 如果随着时间的推移服务器上有多个域,那么跟踪证书列表将非常困难。 certbot.

certbot certificates

如果只有活动域保留在证书列表中,那将是最好的。

删除旧域 Certbot certificates - 如何

通常,在从网络服务器删除域或子域之前,它必须首先撤销并删除 Let's Encrypt 证书。 我们执行命令“certbot“要显示活动域的数字列表,然后是命令”certbot delete number number"删除证书 SSL. 删除旧域 certbot certificates.

如果我们在从网络服务器中删除域之前没有这样做,它将保留在证书列表中 certbot. certbot certificates.

有关过去已启用的域的数据 certbot 被严密地保存在三个地方。 定制 ”certbot certificates“这些区域,即使它们不再严重存在,也会在下面列出。

/etc/letsencrypt/live
/etc/letsencrypt/renewal
/etc/letsencrypt/archive

我们在网络服务器中执行命令“ls -all /etc/letsencrypt/live”查看 Let's Encrypt 中存在的域。

我们从按上述顺序显示的列表或从“certbot certificates",然后我们执行以下命令:

certbot delete --cert-name olddomain.tld

我们确认“Y”从证书列表中删除域 Certbot.

[root@buffy ~]# certbot delete --cert-name olddomain.tld
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The following certificate(s) are selected for deletion:

  * olddomain.tld

Are you sure you want to delete the above certificate(s)?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Deleted all files relating to certificate olddomain.tld.
[root@buffy ~]# 

证书 SSL 将被删除(删除旧域 certbot certificates)在 Certbot 域名及其子域(如果它们使用相同的证书)。

  Certificate Name: olddomain.tld
    Serial Number: 3fd34e0e3304521371abe948
    Key Type: RSA
    Domains: www.olddomain.tld olddomain.tld
    Expiry Date: 2022-02-09 09:46:12+00:00 (INVALID: EXPIRED)
    Certificate Path: /etc/letsencrypt/live/olddomain.tld/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/olddomain.tld/privkey.pem

还有一些场景我们可以使用证书 SSL 域和一些子域不同。 尤其是当除了 Certbot 我们使用组合 administrator DNS 是 SSL Cloudflare 服务。

作为科技爱好者,我从2006年开始在StealthSettings.com上愉快地撰写文章。我在操作系统方面有丰富的经验,包括macOS、Windows和Linux,还熟悉编程语言和博客平台(WordPress),以及在线商店平台(WooCommerce、Magento、PrestaShop)。

如何以 » Linux » 删除旧域 Certbot certificates (让我们加密证书)
发表评论