How to run a project running on wamp/xampp server using system's IP address in place of localhost?
Actually I'm making a web project using Wamp server, and to run the same I access it using the usual local-host address, as we do while building a project on our PC. But to share my project with my friends, I want to make access using the IP address of my computer. But when I make such an access it is not able to connect, which is not the case with my friend's project.
After I failed accessing using the Wamp Server, I installed Xamp Server, the project can be accessed using local host with both the servers (running one at a time) but not when accessed using my PC's IP address (which I find using http://www.whatismyip.com/)
Please Help me Sort out the开发者_开发百科 problem, so that I can share my project with my friends and get a feedback from them.
First check the Listen
directive in apache's configuration file (usually httpd.conf
). If it only listens on 127.0.0.1
then it can not be accessed on your network interface.
You can also check it with:
netstat -na
You should see that port 80
is litening on all interfaces as somthing like:
Proto Local Address Foreign Address State
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING
If this is the case then you should check the access to your port 80 from the outside world. First of all firewalls can block the access to it. If you are behind a NAT (router) then you should use it's port forwading settings to open port 80 (or other arbitrary port) on the router an forward it to the port 80 on your PC.
精彩评论