Localhost is forbidden when using IP address instead of 'localhost'

5,614

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)

Share:
5,614

Related videos on Youtube

Taimur
Author by

Taimur

struggling maths student

Updated on September 18, 2022

Comments

  • Taimur
    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
      nathpilland almost 12 years
      Do you have apache running on your android?
  • Taimur
    Taimur almost 12 years
    Thanks for your reply, what are the parts of the Apache config that I should be checking (I don't understand most of it)?
  • parashep
    parashep almost 12 years
    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-messa‌​ge
  • Black
    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
    Scott Chamberlain about 6 years
    @Black I don't know, never used WAMP before. Mainly I am going from my experience with IIS servers.