I'm trying to do something that seems to be very basic (and obvious), but it is not working so maybe I'm not implementing the idea correctly and that's why I need your help.
I have a web server with IIS7 (if it works only in IIS7.5 I also have it available) with a Website configured to port 80 and also with a SSL certificate configured to port 443.
Under this website I have two Applications folders running a .NET app each. Something like the tree below:
- ServerName -- Sites --- MyAppsWebSite ---- ApplicationFolder1 ---- ApplicationFolder2
I'm organizing the server like this so I won't have any application running on the root on the website to avoid confusion and configuration sharing due to inheritance of configs.
What I need to do is have one subdomain mapped to each application of this website. Something like this:
app1.myDomain.com -> ApplicationFolder1 app2.myDomain.com -> ApplicationFolder2
However as far as I know I can only map a subdomain to the specific website (using host names) and not to a application so I'm not being able to make it work.
One possibility would be to create one website per application, but then I would not be able to use the SSL certificate since we cannot have two websites sharing the same port (80/443).
Is there a way this could be done in IIS or am I missing something and trying to do something impossible?