I am using Windows 10 with IIS enabled.
I need to setup local websites on different ports with hostnames which I can access locally by using those hostnames.
For e.g.
Website Name: abcd website
Path to Directory: D:/Projects/Websites/abcd.com
Hostname: abcd.com
Port: 1001
Currently I can access the website with localhost:1001 or 127.0.0.1:1001
But I'm looking forward that my local websites should get resolved with hostnames.
So, if I go to http://abcd.com/ it should take me to http://localhost:1001/
With this I wish to setup subdomains to some websites as well.
I need help to achieve this.
Best Answer
If you want to do this locally then modifying the HOSTS file of the server hosting your site to point to the local machine's IP when visiting the abcd.com domain should do it.
Add the following entry to the file:
Click File > Save to save your changes.
Source: http://www.rackspace.com/knowledge_center/article/modify-your-hosts-file
NOTE: If you want to do this from another computer you have admin rights on then you use the same approach. If you want to do this from another computer you do not have admin rights on then you should go about getting a dedicated DNS entry set up for this site