我正在尝试使用 --manual 插件生成 Letsencrypt 证书。我使用“手动”,因为在我的服务器中我有 python2.6,我几乎需要 python2.7,所以我从我的笔记本电脑生成证书,然后导出证书。就我而言,我只能使用 http 8280 端口或 https 443 端口。所以我使用的命令是:
./letsencrypt-auto certonly --manual --http-01-port 8280
然后它要求在我的网站上创建一个 secret 文件并给我一个命令来执行它。在此之后我有这些错误:
Failed authorization procedure. mydomain.es (http-01):
urn:acme:error:connection :: The server could not connect to the client to verify the domain ::
Could not connect to http://mydomain.es/.well-known/acme-challenge/_6UES5rHkQ78etjN3HmT4n2l5J66vDs1nCX2APzuzIE
我可以通过网络导航器访问我的 secret 文件,所以我确信与服务器的连接是可能的。在 http://mydomain:8280/.well-known/acme-challenge/
我可以看到生成的 secret 文件。所以我不知道为什么服务器无法连接到客户端。
最佳答案
LetsEncrypt 服务器不支持switch http port on production然而。如前所述here它永远不会支持任意端口(比如你正在尝试的 8280)。 They say它可能在未来支持另一个特权端口(低于 1024)。
仔细检查您可以阅读的错误消息:
Could not connect to http://mydomain.es/[...]
如图所示,Letsencrypt 正尝试通过端口 http 80 访问您的服务器(URL 中未指定端口表示默认端口 80)。
编辑:
您可以使用独立模式运行 tls-sni-01 身份验证,因为您有可用的端口 443。
关于apache - 手动生成Letsencrypt证书,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37049211/