I am using Windows 7 with IIS 7.5. I need to setup local websites on the same IP but on different ports with hostnames which I can access locally by using those hostnames.
Website name: apple website
Path to directory: C:\inetpub\wwwroot\apple
Website name: orange website
Path to directory: C:\inetpub\wwwroot\orange
Currently I can access the website with https://localhost:44310 or https://localhost:44311, but I would like that my local websites should get resolved with hostnames: https://applewebsite.com and https://orangewebsite.com
I know that hosts name are stored in
C:\Windows\System32\drivers\etc\hosts folder but I know that you can't use ports but only ip-name pairs.
In IIS manager when I try to bind a website, while I change from http protocol to https, the text field "hostname" become grayed. I think that this behavior is due to security certificate but using OpenSSL to create the certificate, the Common Name should be typed as
*.websitename.com. In this case while binding the website, the "hostname" field can be edited.