如何为子域创建 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.
最佳答案
您可以为子域创建 Let's Encrypt 证书,而无需将 domian 指向任何根。
- 登录到 DNS 管理并为 subdomian 创建一个 NAME 记录。对于 A NAME,您需要 IP 地址
- 验证 sub.domian.com 可通过互联网访问。
- 为 sub.domian.com 运行脚本。
https://zerossl.com/free-ssl/#crt也可用于生成证书和 key ,但是需要一些手动步骤来创建 .well-known 和 aceme-challenge 文件夹需要在 sub.domian.com/DocumentRoot 中创建
关于linux - 如何仅为子域创建 Let's Encrypt 自签名证书? (帖子错误),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46175664/