Ssl – have two IIS sites using one SSL certificate where one is a “sub folder”

iis-7.5ssl

I have two sites on one IIS 7.5 server and a SSL certificate for *.mydomain.com .
Site1 is a wordpress site with the company presentation on it. It goes to the domain www.mydomain.com

Site2 is a our own developed Customer System where our customer can login and watch information about thiere account. It is bound to site2.mydomain.com AND www.mydomain.com/site2

We need both sites to use HTTPS for obvious resons. But I'm unsure how to set up so that site1 one is bound to www.mydomain.com and site2 to is bound to "https://www.mydomain.com/site2" AND "https://site2.mydomain.com".
This is simple for HTTP but I'm not able to change what address the binding should listen to for HTTPS/SSL.
http should just redirect to https.

Do you please have any explenation to why this doesn't work or suggestions how I should solve it? We would prefer to keep it as 2 different sites in IIS.

Best regards
Niklas

Best Answer

Java's response is partially correct, I wanted to add this as a comment but need to work on the rep.

Anyway, if your wildcard certificate would cover both your sites then just add the HTTPS binding without specifying an IP, that way the wildcard would secure any incoming connection, regardless whether this is sub.domain.com or domain.com/site2.

So within your site bindings it should appear as ...:443 and that is it. If you are using separate internal IP's per site then you can just go ahead and assign the certificate to those. But in theory your implementation should be easy. Just let us know any issues you run into and I am sure myself or anyone else here will be glad to help