Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an android connected to wifi. I want to access the localhost from my windows pc with my phone because i am creating a mobile web app that i want to access through my localhost in the phone. I tried 192.168.x.x/8080/. I also tried the routers ip with it. I dont know if i am doing anything wrong. Firewall is off and i followed every instructions i could see on stackoverflow but none of it work for me. I also tried google for answers almost all of it works to install a localhost to my phone none for actually accessing it in my phone. Thanks in advance.

share|improve this question

migrated from Jan 12 '14 at 8:28

This question came from our site for professional and enthusiast programmers.

so you have apache on Windows machine and you want to access it with a phone? Apache usually runs on port 80 so it's 192.168.x.x:80. What kind of error do you see? 404? 403? – gh0st Jan 12 '14 at 3:55
when i go to 192.168.x.x/8080 i encounter forbidden you dont have permission to access 8080 on the server...when i tried it with :8080 is says like the page does not exist or moved – Andre malupet Jan 12 '14 at 4:00
If you get a 403, the connection is working. It's the server configuration that makes it respond with 403. – laalto Jan 12 '14 at 8:01
yeah that is what i thought so also. any suggestions as to what configuration might cause 403? thanks – Andre malupet Jan 12 '14 at 11:49
up vote 1 down vote accepted

Two things to try:

  • To check what port apache is listening for, go to your apache directory, open the conf sub-directory, and open httpd.conf. Look for "Listen." I believe it's 80 by default, but just to be sure, edit it to read:

    Listen 80

Or set it to whatever port you want, but 80 is the only one you won't have to explicitly type in your url.

  • Open a command prompt on your pc and type ipconfig. Try the IPv4 address in your Android's browser (mine is and connects to my apache server just fine).

Your problem could obviously be anything, but these are some common solutions.

share|improve this answer
ok i tried it again and it worked and i dont know why..tried the same 192.168.x.x.. anyway thanks for all this.. it actually helped – Andre malupet Jan 12 '14 at 12:42

You should use this instead of 192.168.x.x

enter image description here

See the Android Documentation.

share|improve this answer
i tried it. still nothing. – Andre malupet Jan 12 '14 at 4:01
Have you set permissions on your Manifest for accessing internet ? – Shankar Damodaran Jan 12 '14 at 4:06
OP's not using an emulator but an actual device as far as I understood the question. – laalto Jan 12 '14 at 8:02
yes i am using an actual device. i want to be able to use localhost so only people who are connected to wifi can access the site. – Andre malupet Jan 12 '14 at 11:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .