简体   繁体   中英

IIS multiple sites on same ip with different ssl

I cant seem to run multiple sites using the same IP with different ports and different ssl cert.

site a is fine but site b is returning SSL_ERROR_BAD_CERT_DOMAIN because it's returning site a's ssl cert.

This is the error I get when trying to use it on the same ports hence I use different ports for the domains

在此处输入图片说明

Here are my thoughts:

  1. First of all SSL certificates are most commonly issued against domain names instead of IP addresses.
  2. In your scenario you have one IP address so only one certificate can be issued against one IP address.

Options:

  1. Get multiple SSL certificates for your website domains assuming your websites will be hosted on different domains eg example1.com, example2.com
  2. Get wild card ssl certificate and then use it for your multiple websites assuming your websites will be hosted on sub-domains eg site1.example.com, site2.example.com

在此处输入图片说明

So the solution provided by Moshin Mehmood did resolve the issue.

Any site on IIS will have to use SNI and there is no reason to supply a specific IP if all the sites use the same one, IIS will give an error about not having any default ssl bindings but that is a legacy thing and not cause for concern.

Thank you very much Mohsin.

Here is a great article and what you need. SNI is only available on IIS 8 and greater which is Windows 2012 and later..

https://www.sherweb.com/blog/cloud-server/scaling-ssl-with-iis-8-server-name-indication/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM