Access multiple virtual host from another machine or remote PC

In addition to danp’s answer, you can access the virtual host without having to change the client machine’s etc/hosts file by assigning a port to the virtual host. This is ideal if you want to access the server with a mobile or tablet device:

1) Edit server’s httpd.conf file:


Search for “Listen” (around line 61). You should see the following that allows for Apache to listen for port 80:

Listen [::0]:80

Add the following lines to add listening for port 81 (or any port):

Listen [::0]:81

2) Edit httpd-vhosts.conf: \wamp\bin\apache\apache2.2.x\conf\extra\httpd-vhosts.conf

Change your virtual host tag to port 81:

<VirtualHost *:81>
    DocumentRoot "D:/websites/project1/"

3) Restart Apache server.

4) On the client machine/tablet/mobile, on the web browser enter the server’s ip address (, or whatever IP) and port as the URL in the following format:


Thats all you need


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s