Localhost is forbidden when using IP address instead of 'localhost'
Solution 1
Left Click on WAMP Server Icon in System Tray, Choose "Put Online". Now check on your Andoid, it won't show 403 Forbidden Page.
Solution 2
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)
Related videos on Youtube
Comments
-
Taimur over 1 year
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
-
nathpilland almost 12 yearsDo you have apache running on your android?
-
-
Taimur almost 12 yearsThanks for your reply, what are the parts of the Apache config that I should be checking (I don't understand most of it)?
-
parashep almost 12 yearstake 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
-
Black about 6 years"What you need to do is change the configuration of the server to allow connections via your PC's address" And how ?!
-
Scott Chamberlain about 6 years@Black I don't know, never used WAMP before. Mainly I am going from my experience with IIS servers.