问题原文
原帖链接 · manifestor · CC BY-SA 4.0
I have the following certificate:
# certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Found the following certs:
Certificate Name: domain.example
Domains: domain.example imap.domain.example mail.domain.example pop.domain.example smtp.domain.example www.domain.example
Expiry Date: 2019-09-09 03:34:20+00:00 (VALID: 62 days)
Certificate Path: /etc/letsencrypt/live/domain.example/fullchain.pem
Private Key Path: /etc/letsencrypt/live/domain.example/privkey.pem
Now what I want to do is to remove domain.example and www.domain.example from the certificate, because the web server has moved to another instance. The fact, that the DNS entries have been changed means, that the renewal process will fail if domain.example and www.domain.example are still part of the certificate, because the DNS entries point to another IP now.
How can I remove certain host names from a let's encrypt certificate without deleting the certificate and creating a new one?
社区高分解答
原帖链接 · Kurt Roeckx · CC BY-SA 4.0
You should use --cert-name together with the list of hostnames you want to keep. So:
certbot certonly --cert-name example.com -d imap.domain.example,mail.domain.example,pop.domain.example,smtp.domain.example
See https://certbot.eff.org/docs/using.html#changing-a-certificate-s-domains
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
