如何为子域创建Let's Encrypt自签名证书?
具体来说:
sub.domain.com
(需要证书并指向IP地址)domain.com
(不指向任何内容)关注the following instructions后,我收到以下错误:
>>> sudo -H ./letsencrypt-auto certonly --standalone -d sub.domain.com --register-unsafely-without-email
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for sub.domain.com
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. sub.domain.com (tls-sni-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Timeout
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: sub.domain.com
Type: connection
Detail: Timeout
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you're using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.
答案 0 :(得分:1)
您可以为子域创建Let's加密证书,而无需将domian指向任何根目录。
https://zerossl.com/free-ssl/#crt也可用于生成证书和密钥,但是需要一些手动步骤才能创建.well-known和aceme-challenge文件夹需要在sub.domian.com / DocumentRoot中创建
答案 1 :(得分:0)
您需要在服务器上运行命令,因为该命令会验证您是否控制了域,因此如果它不在服务器上,则无法正确验证。