任务: 我想使用 LetsEncrypt Certbot 提供的 DNS 质询方法一次性为 *.example.com 和 example.com 创建一个通配符证书。
重现: 在尝试获取设置我的 SSL 证书所需的证书文件时,我遇到了 LetsEncrypt Certbot 的 catch22 情况。
我使用这些参数调用 certbot 命令
certbot certonly --agree-tos --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory -d "*.example.com,example.com"
然后要求在命令的响应中输入两个 DNS TXT 记录。
到目前为止,还不错。但是,如果我按照 certbot 命令的请求为给定域输入两个请求的 DNS TXT 记录,我会收到一条错误消息:
IMPORTANT NOTES: - The following errors were reported by the server:
Domain: example.com Type: unauthorized Detail: Incorrect TXT record "[authentication snippet for example.com]" found at
_acme-challenge.example.comTo 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.
问题:Certbot 不接受刚刚提示我设置的 DNS TXT 记录。
Certbot 似乎无法处理我试图同时为“*.example.com”和“example.com”请求证书的事实,将它们视为属于两个不同的域领域,并且没有按预期接受两个 TXT 记录。
最佳答案
事实证明,这个错误确实是由于域名提供商导致的 DNS 刷新滞后而发生的。 @low_skilled 的回复帮助我弄清楚我输入的实际 TXT 记录需要几分钟才能由域服务提供商设置,即使它的 TTL 设置为 60 秒。谢谢回复。问题解决了!
关于ssl - LetsEncrypt Certbot 拒绝通配符证书的 DNS TXT 记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54654135/