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'm trying to access my localhost from my Android tablet, but I'm having problems. I'm using WAMP server and configured the httpd.config file, and port forwarded 80, but I still can't access localhost using my local IP address.

My local IP address is 192.168.1.24 according to ipconfig, but this brings up a 403 forbidden when I try to access it from both my computer and my tablet. Accessing 'localhost' from the PC works, but not from the tablet.

What is happening?

Thanks

share|improve this question
    
Do you have apache running on your android? –  nathpilland Aug 2 '12 at 23:35
    
I don't, but judging from all the tutorials I tried I shouldn't need it. Apache is running on my PC with WAMP, and I'm just trying to connect to my PC localhost as opposed to host one off the Android. Thanks –  Taimur Aug 2 '12 at 23:37
add comment

3 Answers

localhost will not work on your Android because that would mean your Android would be trying to connect to itself rather than the computer.

port forwarding shouldn't matter in this case, because you're doing locally. are your Android device and your PC on the same network?

I would double-check your Apache configuration and make sure it will accept connections from other devices, and maybe double-check your computer's IP address from the router's control panel just to be safe. (in rare cases, ipconfig can report the wrong address)

share|improve this answer
    
Thanks for your reply, what are the parts of the Apache config that I should be checking (I don't understand most of it)? –  Taimur Aug 2 '12 at 23:50
    
take a look at this question on Stack Overflow, it seems to be the same issue that you're having: stackoverflow.com/questions/8204902/wamp-403-forbidden-message –  parashep Aug 2 '12 at 23:54
add comment

Left Click on WAMP Server Icon in System Tray, Choose "Put Online". Now check on your Andoid, it won't show 403 Forbidden Page.

share|improve this answer
add comment

Localhost means address 127.0.0.1 that address is a special address that points back at the network adapter that generated the request. When you tried to access the page via 192.168.1.24 it saw that the request was going to a different address than 127.0.0.1 and rejected it on the PC. When you attempted to connect to it on your tablet your tablet just attempted to connect to itself.

What you need to do is change the configuration of the server to allow connections via your PC's address of 192.168.1.24, not just the local host address.

share|improve this answer
add comment

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.