e-i*_*128 41 lets-encrypt certbot
我有多个域有多个证书:
$ ll /etc/letsencrypt/live/
> domain1.com
> domain2.com
> domain3.com
> ...
Run Code Online (Sandbox Code Playgroud)
我只需要续订domain1.com,但该命令会certbot renew更新所有域的证书.如何明确续订某些证书?
Bak*_*ker 54
续订使用单一证书renew与--cert-name选项.
(为一个或多个域certonly 创建证书,如果存在则替换它).
certbot renew --cert-name domain1.com --dry-run
Run Code Online (Sandbox Code Playgroud)
删除--dry-run实际续订.
请注意,提供给--cert-name选项的值是使用的证书名称(不是域名)
certbot certificates
Run Code Online (Sandbox Code Playgroud)
返回一个像这样的列表
-------------------------------------------------------------------------------
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
-------------------------------------------------------------------------------
Run Code Online (Sandbox Code Playgroud)
请注意第三个证书名称(forums.myfundomain.com)如何包含多个域:
-------------------------------------------------------------------------------
new certificate deployed without reload, fullchain is
/etc/letsencrypt/live/ask.myfundomain.com/fullchain.pem
-------------------------------------------------------------------------------
Run Code Online (Sandbox Code Playgroud)
请记住重新启动您的网络服务器以使用新证书.
Arz*_*zhh 45
您可以使用此命令(对于Apache服务器):
certbot --apache certonly -n -d domain1.com
Run Code Online (Sandbox Code Playgroud)
--apache对于apache服务器,使用--nginxnginx服务器的标志-n 选项执行命令而不提示-d domain1.com 仅为domain1.com执行你可以测试--dry-run,你可以使用--pre-hook和--post-hook喜欢certbot renew
资料来源:https://certbot.eff.org/docs/using.html#renewing-certificates
| 归档时间: |
|
| 查看次数: |
59213 次 |
| 最近记录: |