Thursday, January 7, 2016

XAMPP - cannot access web server over LAN all of a sudden?

I use XAMPP for my PHP web development. My wife designs the sites that I work with, and sometimes she needs to access my local web server from her PC. Usually that's as easy as typing in my PC's network name in her browser and she can access everything on my localhost.

Since a few days ago, it stopped working. She even tried using my IP address directly in her browser, but that too, didn't work.

Then I remembered, Windows 10 updated something a while back, and I guess it was then when this issue started. Turned out, I had to allow port 80 over my Windows Firewall again. So, if you're running Windows 10, here's how to do that:

Press the Start button, and type in Firewall, then click on Windows Firewall with Advanced Security at the top:


This will open up the Firewall window, which looks like this:

(click on the image to see it bigger if you need to)

What we want to do is set up a new Inbound Rule, so at the top left, click on Inbound Rules:


Then, to create the new rule, click on New Rule... on the right:


That opens up the New Rule dialogue window:


We want to open up Port 80 on the Firewall, so click on Port, and then Next > at the bottom, which will bring you here. Make sure TCP is selected, and type in 80 where it says Specific local ports:


Click Next > at the bottom again, which brings you here:


Make sure Allow the connection is selected, and click Next > once again, bringing you to this screen:


Select the appropriate settings here for your network. In most cases, the Private one should be sufficient. Finally click Next > once more, and give this Rule a name and description, and you're done with this section.

Last, but not least, restart Apache, and you should be all set to go.

Hope this helps!

No comments:

Post a Comment