Accessing Localhost (xampp) From Another Computer Over LAN Network - How To?
Answer :
Localhost is just a name given for the loopback, eg its like referring to yourself as "me" ..
To view it from other computers, chances are you need only do http://192.168.1.56 or http://myPcsName if that doesnt work, there is a chance that there is a firewall running on your computer, or the httpd.conf is only listening on 127.0.0.1
Thanks for a detailed explanation.
Just to Elaborate, in Windows, Go to Control Panel -> Firewall, in exceptions "add http and port 80". Then in Services check mark "http (web server port 80)" and "https (web server port 443)" ONLY if you need https to work also. Ok, OK, Close
Then go to any computer on network and type http://computer-name (where you change the firewall and has the xampp running on it) in your web browser and happy days :)
it's very easy
- Go to Your XAMPP Control panel
- Click on apache > config > Apache (httpd.conf)
- Search for Listen 80 and replace with Listen 8080
- After that check your local ip using ipconfig command (cmd console)
- Search for ServerName localhost:80 and replace with your local ip:8080 (ex.192.168.1.156:8080)
- After that open apache > config > Apache (httpd-xampp.conf)
Search for
<Directory "C:/xampp/phpMyAdmin"> AllowOverride AuthConfig **Require local** Replace with **Require all granted** ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var </Directory>```
Go to xampp > config > click on service and port setting and change apache port 8080
- restart xampp
- then hit your IP:8080 (ex.192.168.1.156:8080) from another computer
Comments
Post a Comment