I have a windows server 2008 with IIS7 with 4 websites. In DNS I have 4 different URLs which point to the IP of the server. I configured each web site with the site bindings:
website1:
hostname: url1, port: 80, IP-Adresse: the adress of the server
website2:
hostname: url2, port: 80, IP-Adresse: the adress of the server
The result is, that from the client, I can browse with all the 4 URLs to the specified web sites and everything is fine.
Then I changed in IIS the port of the websites, so that website1 now uses port 8080, website2 uses port 8081, and so on. Now I have to use the browser with the url and the portnumber (like URL:8080).
Is there a possibility, to configured the websites with different portnumbers but not to use the portnumbers in the browser?
Best Answer
Yes, but only if your environment includes a NAT firewall/router and multiple external IP addresses.
For http connections, the port number is optional on the browser only if the browser is connecting on port 80. Therefore, the browser would need to connect to port 80 in order for the port number to be optional in the URL.
Here is one possible scenario:
With the firewall/router configured in this way, the browser clients would think they were connecting on the standard port 80, so no port number would need to be used in the external URL. However, the connections would be routed to ports 8080 and 8081, respectively, on your private network.
Is there a specific reason why you would like to use non-standard ports on the web server without requiring them to be entered as part of the URL?