【发布时间】:2022-01-07 04:16:30
【问题描述】:
我已经通过带有 DNS 插件的 certbot 成功设置了 SSL 证书。这很好用,我已经为 example.com 和 *.example.com 颁发了证书:
certbot certificates 输出:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
Certificate Name: example.com
Domains: example.com *.example.com
Expiry Date: 2022-02-28 11:09:56+00:00 (VALID: 89 days)
Certificate Path: /etc/letsencrypt/live/example.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/example.com/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
到目前为止一切顺利,所有域似乎都得到了正确保护:
example.com = OK
test.example.com = OK
但是,问题开始于域 test1.test.example.com。浏览器不断抱怨域不安全的事实..!我已经重新签发了 SSL 证书。这成功了,但域仍被标记为不安全。
需要注意的是,如果我将域的Apache 配置修改为不将http (insecure) 流量重定向到https (secure) 流量,我可以访问该站点。这验证了我的 apache 设置,实际上只有 1 个配置文件,允许:
ServerName example.com
ServerAlias *.example.com
编辑:也许这会有所帮助。 Safari 告诉我证书名称example.com 与输入不匹配? Firefox 返回SSL_ERROR_BAD_CERT_DOMAIN。因此,我尝试更新域以允许*.*.example.com,但 certbot 不允许这样做,因为它返回:Cannot issue for '*.*.example.com': Domain name has more than one wildcard
编辑 2:DNS 插件生成了一个 json 文件,其中包含验证域的身份验证信息。此文件包含条目fulldomain 和subdomain,但问题出在two level 'sub-sub' domain?也许这就是问题所在?由于 certbot 插件不允许多通配符域,我该如何解决这个问题?
【问题讨论】:
标签: apache certbot certbot-dns-plugin