Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access my localhost from another PC in LAN?

I am using WAMP server to run my website. I am using Windows 7.

I created LAN between 2 PC and I want to access my localhost from the second PC.
Note that I am not using Internet connection so I couldn't use IP address.

Please, give me your suggestion.

like image 545
Glories Avatar asked Apr 04 '12 20:04

Glories


People also ask

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

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 Answers

You have to edit httpd.conf and find this line: Listen 127.0.0.1:80

Then write down your desired IP you set for LAN. Don't use automatic IP.
e.g.: Listen 192.168.137.1:80

I used 192.167.137.1 as my LAN IP of Windows 7. Restart Apache and enjoy sharing.

like image 65
Abbas Uddin Avatar answered Sep 20 '22 03:09

Abbas Uddin