我正在设置一些问题让我们encryption两个不同的服务器上设置的几个网站,并通过HAProxy分配给他们的stream量。
服务器上有一些VHosts /域,所有这些都需要SSL证书。 为了这篇文章,可以说他们是:
这两个Alogging都设置了两个IP地址。 我可以用nwtools.com或者nslookup进行validation,Aloggingfoo.some-site.com和bar.some-site.comparsing相同的两个IP地址。 而且我知道Let's Encrypt要求vhost有一个有效的logging,所以可以进行查找。
我计划在两台服务器上运行所有虚拟主机的Lets Encrypt安装程序,并且对其中一个虚拟机运行正常,但是当我转到第二个时,出现错误:
[root@server httpd]# /opt/letsencrypt/letsencrypt-auto --apache -d foo.some-site.com Checking for new version... Requesting root privileges to run letsencrypt... /root/.local/share/letsencrypt/bin/letsencrypt --apache -d foo.some-site.com Failed authorization procedure. foo.some-site.com (tls-sni-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Failed to connect to host for DVSNI challenge IMPORTANT NOTES: - The following errors were reported by the server: Domain: foo.some-site.com Type: connection Detail: Failed to connect to host for DVSNI challenge To fix these errors, please make sure that your domain name was entered correctly and the DNS A 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.
这可能是因为它正在做一个查找或试图curlfoo.some-site.com ,它可能被引导到其他服务器? 我不知道这是如何真的很重要,因为两者都有相同的VHosts,除非LetsEncrypt实际上在监听它自己的连接…
有什么让我失望的是,其中一个很好(比如说bar.some-site.com ),所以为什么它会在一个网站上运行,但是如果另一个网站的设置完全相同,它会失败。
如果有人知道一个办法让两个不同的服务器上的相同的虚拟主机让encryption设置,帮助将不胜感激!
这可能是因为它正在做一个查找或试图curlfoo.some-site.com,它可能被引导到其他服务器?
是的,绝对是。
LE需要连接到运行LE客户端的服务器,作为域validation质询 – 响应过程的一部分。 没有深入细节,LE客户端实际上会在您的Web服务器上临时使某个文件可用,LE服务器需要能够使用来validation域的所有权。
在所有后端服务器上运行此命令是不必要和麻烦的。 运行一次,然后将密钥和证书链复制到其他后端服务器。
有什么让我失望的是,其中一个很好(比如说bar.some-site.com),所以为什么它会在一个网站上运行,但是如果另一个网站的设置完全相同,它会失败。
因为你运气好 :)有可能你的负载平衡器偶然地将LE请求定向到正确的位置,但是没有第二次执行。
涉及多个Web /应用程序服务器/负载平衡器的scheme有多种方法。 您可以阅读官方Let's Encrypt集成指南中的一些更大的环境。
有一些干净的做法,如:
什么对你有意义将取决于你的喜好和各种环境的具体要求。