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, when I change from http protocol to https, the text field "hostname" become grayed.
Update: if the Common Name (CN) is typed in this way
*.websitename.com the text field "hostname" can be edited.