The problem is that only one site can be bound to the https protocol and if I disobey that rule I get strange behaviour such as requests for site1 actually serving the page from site1.
How to host multiple secure sites on your local IISFirst, you should know that sites resolve which site to bind to based on:
- Host header e.g. local.www.site1.com
- Port e.g. 443
- IP adress
Navigate your way to
C:\Windows\System32\inetsrv\configwhere you may or may not see applicationHost.config. This is a very mysterious file, it's there but not, sort of. I've found that it can be edited in NotePad (but nothing else(?))
Ctrl+F your way to "443:" and you should find your attempted 443 http bindings. In my case there are two and they both look like
<binding protocol="https" bindingInformation="*:443:" />(Oh yeah they are exactly the same, lets change that.
Change them to
<binding protocol="https" bindingInformation="*:443:local.www.site1.com" />and
<binding protocol="https" bindingInformation="*:443:local.www.site2.com" />respectively.