Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am able to access localhost by visiting my local ip in the browser from other pcs / phones, tablets, etc but I am not sure how to access the vhosts on that machine. Is there a syntax for accessing vhosts?

http://192.168.x.x // gives me localhost

I would like to be able to access something like below



share|improve this question
up vote 1 down vote accepted

You have to edit the hosts file on the other computers on that lan and direct the desired domain name for the vhost to your pc's ip. For linux the hosts file is at /etc/hosts, for Windows, C:\Windows\system32\drivers\etc\hosts mostly.

Suppose, your LAN IP is and you have a vhost setup as and you want to access it from other PCs on that network. Now open the hosts file as the admin on other PCs in that LAN, add the following line -

and save it. Then restart that PC. Now try to access in any browser from those PCs and you should see the vhost that you setup in your PC.

share|improve this answer
k, thanks. And on a related note:…. I have to wait a few minutes to accept the answer since this is my first post. :) – Shane Feb 10 '12 at 16:54
Ok. added some more details. Check it out. :) – Bibhas Feb 10 '12 at 16:57
thanks again! this is amazing too - , it works for vhosts on the iPad – Shane Feb 10 '12 at 17:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .