• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Access localhost from android device

Daddedebad

Lurker
Hello!

I have a mySQL database and use WAMP server on PC and want to connect to it using my real life phone.

So first of all I want to simply connect to my localhost, nothing more, no getting values out of mySQL or running scripts, just checking the connection. It should be possible by just typing in the IPv4 address(192.168.1.xxx) of the PC in the phones browser, right? When I do that I get "ERR_INVALID_HTTP_RESPONSE". I'm on the same wifi, I've tried turning the firewall off.

I'm completely new to this kind of thing so I might be missing something really obvious. If I can access my WAMP homepage using IPv4 address "192.168.1.xxx" on the PC that runs it, it should be possible to do the same on my phone using that same address as long as I'm on the same wifi?
 
Can you connect to the server locally on your PC using the web browser? Are you using SSL (HTTPS)?
 
I'm not using SSL and when I made the post I could connect to the server on my PC.

I think I might have figured out what the problem was but I'm not sure... My PC that runs the server was plugged in with ethernet, so when i unplugged and went on wireless I at least got a error 403 on the phone.

I tried to change my "httpd-vhosts.config" file to grant access, but it didn't work so removed the changes and now the PC that runs the server is also getting error 403 when I try to connect...
 
Back
Top Bottom