How can I access localhost from another computer in the same network?

WindowsApacheWampWampserver

Windows Problem Overview


I just recently downloaded WAMP Server to view and edit php webpages but now I would also like other people in my network (connected to the same wifi) to be able to access localhost and all the files that I have saved. I have already tried to access localhost and my WAMP server was already online, however that didn't work. Can someone help me out? Thanks in advance!

Windows Solutions


Solution 1 - Windows

You need to find what your local network's IP of that computer is. Then other people can access to your site by that IP.

You can find your local network's IP by go to Command Prompt or press Windows + R then type in ipconfig. It will give out some information and your local IP should look like 192.168.1.x.

Solution 2 - Windows

localhost is a special hostname that almost always resolves to 127.0.0.1. If you ask someone else to connect to http://localhost they'll be connecting to their computer instead or yours.

To share your web server with someone else you'll need to find your IP address or your hostname and provide that to them instead. On windows you can find this with ipconfig /all on a command line.

You'll also need to make sure any firewalls you may have configured allow traffic on port 80 to connect to the WAMP server.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser2735791View Question on Stackoverflow
Solution 1 - WindowsTri HoangView Answer on Stackoverflow
Solution 2 - WindowsJonathan KView Answer on Stackoverflow