我在我的IIS 7服务器上为2个不同的网站使用SSL时遇到麻烦。 请参阅下面的设置:
网站1:my.corporate.portal.com
网站1的SSL证书:* .corporate.portal.com
https / 443绑定到my.corporate.portal.com
website2:client.portal.com SSL证书颁发给:client.portal.com当我尝试绑定与客户端的证书在IIS7的HTTPS,我没有一个选项,把主机名(变灰),只要我select“client.portal.com”证书,我在IIS中收到以下错误:
At least one other site is using the same HTTPS binding and the binding is configured with a different certificate. Are you sure that you want to reuse this HTTPS binding and reassign the other site or sites to use the new certificate?
如果我点击“是”,my.corporate.portal.com网站将停止使用正确的SSL证书。
你能提出一些build议吗?
通常,每个SSL站点都需要单独的IP,因此如果尝试绑定到相同的IP,您将看到上述错误。
这是由于SSL的工作原理。 服务器在握手过程中无法读取HTTP主机头,因此无法使用该头信息来select要使用的站点(和证书)。 因此,IIS中的证书基本上是绑定在每个IP上,而不是每个站点。
如果您有适用于多个站点的通配符证书或ASN证书,则可以按如下方式进行设置:
appcmd set site /site.name:"<IISSiteName>" /+bindings.[protocol='https',bindingInformation='*:443:<hostHeaderValue>'] replace并使用适当的值(例如Website1和www.example.com)。
IIS8支持SNI ,允许在同一IP上有多个不相关的SSL站点。 请注意,SNI仅在现代浏览器中受支持,因此如果您正在运行一个广泛的受众群体的商业网站(如运行旧版本Internet Explorer的Windows XP用户),则可能会给您带来麻烦。
为Amazon实例实施Elastic Load Balancing解决了这个问题( http://aws.amazon.com/elasticloadbalancing/ )