Nginx 是否需要为像 Apache 这样通过 HTTPS 提供服务的每个站点一个唯一的 IP 地址?

Jas*_*sta 1 nginx https apache-2.2

使用 Apache 最常见的 HTTPS 设置,每个站点需要 1 个 IP 地址。Nginx 是否有同样的限制,还是单个 IP 地址可以为无限数量的 HTTPS 站点提供服务?

Jam*_*s L 5

Nginx 可以使用SNI重新编译以允许这样做,但它也需要您的 OpenSSL 版本来支持它(我相信是 0.8.9)。请参阅此处了解更多信息。

还值得注意的是,Apache 现在支持 SNI,它已向后移植到 2.2.*。

您可能面临的问题是浏览器兼容性。上面的指南 (nginx) 说明了以下兼容性,但我自己没有检查过:

* Opera 8.0;
* MSIE 7.0 (but only on Windows Vista or higher);
* Firefox 2.0 and other browsers using Mozilla Platform rv:1.8.1;
* Safari 3.2.1 (Windows version supports SNI on Vista or higher);
* and Chrome (Windows version supports SNI on Vista or higher, too).