Letsencrypt将域添加到现有证书 [英] Letsencrypt add domain to existing certificate

查看:131
本文介绍了Letsencrypt将域添加到现有证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是简单地尝试将域test.example.com添加到example.com已经存在的证书中.如何在现有证书中添加域并替换旧证书?

I am just simply trying to add the domain test.example.com to the certificate that already exists for example.com. How do I add a domain to my existing certificate and replace the old certificate?

我尝试了这几个命令

./letsencrypt-auto certonly --cert-path /etc/letsencrypt/archive/example.com --expand -d test.example.com

./letsencrypt-auto certonly -d example.com --expand -d test.example.com

结果:两者都在新文件夹test.example.com-0001中创建了一个全新的证书

Result: both created a brand new cert in a new folder test.example.com-0001

./letsencrypt-auto certonly --renew-by-default  --expand -d test.example.com

结果:错误文件夹test.example.com已经存在.

Result: error folder test.example.com already exists.

./letsencrypt-auto renew --expand -d orange.fidka.com

结果:错误,我只能在证书过期时续订.

Result: error, I can only renew if my certificate is expired.

推荐答案

您需要指定所有名称,包括已经注册的名称.

You need to specify all of the names, including those already registered.

我最初使用以下命令来注册一些证书:

I used the following command originally to register some certificates:

/opt/certbot/certbot-auto certonly --webroot --agree-tos -w /srv/www/letsencrypt/ \
--email me@example.com \
--expand -d example.com,www.example.com

......现在,我成功使用以下命令扩展了注册范围,以将新的子域包括为SAN:

... and just now I successfully used the following command to expand my registration to include a new subdomain as a SAN:

/opt/certbot/certbot-auto certonly --webroot --agree-tos -w /srv/www/letsencrypt/ \
--expand -d example.com,www.example.com,click.example.com

文档:

-expand如果现有证书涵盖了所请求名称的某些子集,请始终进行扩展并将其替换为其他名称."

--expand "If an existing cert covers some subset of the requested names, always expand and replace it with the additional names."

如果您正在运行nginx,请不要忘记重启服务器以加载新证书.

Don't forget to restart the server to load the new certificates if you are running nginx.

这篇关于Letsencrypt将域添加到现有证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆