gpt4 book ai didi

lets-encrypt - 如何使用 certbot 只续订一个域名?

转载 作者:行者123 更新时间:2023-12-03 07:07:22 27 4
gpt4 key购买 nike

我有多个域和多个证书:

$ ll /etc/letsencrypt/live/
> domain1.com
> domain2.com
> domain3.com
> ...

我只需要续订 domain1.com,但命令 certbot renew 会续订所有域的证书。如何明确更新某些证书?

最佳答案

使用带有 --cert-name 选项的 renew 续订单个证书。

(certonly 为一个或多个域创建证书,如果存在则替换它)。

示例

certbot renew --cert-name domain1.com --dry-run

删除 --dry-run 以实际更新。

<小时/>

证书名称!=域名

请注意,提供给 --cert-name 选项的值是使用找到的证书名称(不是域名)

certbot certificates

返回一个列表,例如

-------------------------------------------------------------------------------
Found the following certs:
Certificate Name: myfundomains.com
Domains: myfundomains.com
Expiry Date: 2018-05-04 04:28:05+00:00 (VALID: 67 days)
Certificate Path: /etc/letsencrypt/live/myfundomains.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/myfundomains.com/privkey.pem
Certificate Name: ask.myfundomain.com
Domains: ask.myfundomain.com
Expiry Date: 2018-03-13 18:59:40+00:00 (VALID: 16 days)
Certificate Path: /etc/letsencrypt/live/ask.myfundomain.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/ask.myfundomain.com/privkey.pem
Certificate Name: forums.myfundomain.com
Domains: forums.myfundomain.com forum.myfundomain.com
Expiry Date: 2018-04-11 16:39:18+00:00 (VALID: 45 days)
Certificate Path: /etc/letsencrypt/live/forums.myfundomain.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/forums.myfundomain.com/privkey.pem
-------------------------------------------------------------------------------

请注意第三个证书名称 (forums.myfundomain.com) 如何包含多个域:

  • forums.myfundomains.com
  • forum.myfundomains.com

重新启动 Apache/nginx

-------------------------------------------------------------------------------
new certificate deployed without reload, fullchain is
/etc/letsencrypt/live/ask.myfundomain.com/fullchain.pem
-------------------------------------------------------------------------------

请记住重新启动您的网络服务器以使用新证书。

关于lets-encrypt - 如何使用 certbot 只续订一个域名?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42591165/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com