Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have EasyPHP server on my local computer. I am making program that is connecting to PHP scripts and returns me result to my local PC. Everything works nice I am using 127.0.0.1:8888 address and port. I used 8888 because I needed port 80 for something else.

I am connected to my wireless at my place. I put application on my android and change address to http://192.168.1.101:8888/page.php and I can't get results back.

Anyone knows how can I connect to localhost server trough some other devices which are on same network in my case wireless.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Your webserver is probably only listening on localhost (127.0.0.1), which cant be accessed from any other computer. You want your webserver to listen on all IP addresses. If you are using Apache, edit your config and make sure that your listen line looks like this:

Listen 8888

and your virtual host entry (if you got one) like this:

<VirtualHost *:8888>

This will cause Apache to listen on all interfaces.

share|improve this answer
    
I have something like this : # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the <VirtualHost> # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 12.34.56.78:8888 Listen 127.0.0.1:8888 How to change it? Only to 8888? –  user123_456 Feb 5 '12 at 17:43
    
I have change it as you said. And I have put path like 192.168.1.101:8888/page.php and I still can't access it from my device. Any idea? Can I send you config file? So you can see what is maybe wrong? –  user123_456 Feb 5 '12 at 18:09
    
Did you restart Apache after changing the config? If it still doesn't work edit your question and add the config file. –  WakiMiko Feb 5 '12 at 22:48
    
Your answer was correct. After restart –  user123_456 Feb 6 '12 at 22:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.