nginx:Node.js反向代理:多个域的SSL证书的CNI问题

我是一个网页开发人员,所以要有耐心。

我有3个个人域名托pipe在我的VPS上,用nginx作为Web服务器,将传入的https请求代理到3个不同的Node.js站点。 SSL证书在nginx和Node.js https模块上的所有浏览器上都能正常工作。 浏览器可以。

问题是当我运行openssl s_client -showcerts -connect gabrieleromanato.io:443unable to verify the first certificate ,当我运行openssl s_client -showcerts -connect gabrieleromanato.name:443我得到了同样的错误,因为CN部分显示gabrieleromanato.io而不是gabrieleromanato.name。 gabrieleromanato.io已被设置为default_server 。 否则我无法工作。

我也尝试使用proxy_ssl_certificateproxy_ssl_certificate_key ,如下所示,但运行nginx -t返回一个错误,告诉这样的指令是未知的。 我使用Ubuntu 14.04.5和nginx 1.4.6。

提前致谢。

您使用Comodo证书,我通过SSL实验室检查他们:

https://www.ssllabs.com/ssltest/analyze.html?d=gabrieleromanato.io&latest

https://www.ssllabs.com/ssltest/analyze.html?d=gabrieleromanato.name&latest

问题是您没有按照说明将证书与ca-bundle捆绑在一起:

https://support.comodo.com/index.php?/Knowledgebase/Article/View/1091/37/certificate-installation–nginx

现在,你的服务器只是发送一个证书,这是不完整的,因为我们需要完整的链。

除了这个问题之外,还有一些与安全性有关的普遍问题。 您不应该再使用SSL3.0,并禁用弱密码。 性能方面,您应该考虑会话恢复/caching和OCSP装订。