I’m new to PHP, so I don’t know how to explain it. I’m running WAMP on my computer and I would like to be able to access my localhost from another computer.
Is it possible? How can I do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can easily do this but it would have to be a manual process.
You have to create an entry in the hosts file –
%SystemRoot%\system32\drivers\etc\hosts/etc/hostshttp://en.wikipedia.org/wiki/Hosts_(file)#Location_in_the_file_system.
See the link for details on where your hosts file is located. It depends on the operating system.
The following will have to be done on every machine that you would like
to have access to your
localhostmachine.Add a line at the very end of your hosts file similar to this :
The IP address (in the example above it is
10.0.0.42) is the address of your localhost; Your computers IP address. The domain name (prathyash-localhost.com) is what is mappedto the IP address.
After you save that file, whenever that computer points to
prathyash-localhost.com, it will be directed to your IP address. Firewalls are still a barrier – however the other answers covered that so I will not repeat their contribution.Depending on your situation, manually editing tens maybe hundreds of files might not be feasible. In this case, you might want to consult the networks administrator (he probably hangs around on Server Fault), and he may have a better solution for you.