Virtual Hosting - Port-based

Port-based

The default port number for HTTP is 80. However, most webservers can be configured to operate on almost any port number, provided the port number is not in use by any other program on the server.

For example, a server may host the website www.example.com. However, if the owner wishes to operate a second site, and does not have access to the domain name configuration for their domain name, and/or owns no other IP addresses which could be used to serve the site from, they could instead use another port number, for example, www.example.com:81 for port 81, www.example.com:8000 for port 8000, or www.example.com:8080 for port 8080.

However this is not a user friendly approach. Users cannot reasonably be expected to know the port numbers for their websites and moving a site between servers may require changing the port number. Using non-standard port numbers may also be seen as unprofessional and unattractive to users. In addition, some firewalls block all but the most common ports, causing a site hosted on a non-standard port to appear unavailable to some users.

Read more about this topic:  Virtual Hosting