I want to test my iPhone web Application developed in localhost (XAMPP) in my iPhone. My system IP is 192.168.1.1 in the local network.
When I visit http://192.168.1.1:80
in the browser, it says "The server 192.168.1.1:80 at DSL Router requires a username and password".
I thought it must be my XAMPP username/password but it seems it is not and it shows a 404 error.
Both my system and my iPhone are in the same network. So where am I doing it wrong?
It's possible through secure tunnel services online! These are services that provide you with a tunnel from the Internet to your machine. What that means is that they provide a publicly accessible URL, watch for calls on that URL, and forward those calls to your localhost server.
You can access your host machine with the IP address "10.0. 2.2". This has been designed in this way by the Android team. So your webserver can perfectly run at localhost and from your Android app you can access it via "http://10.0.2.2:8080".
Check to make sure your IP is correct for your host machine.
Windows: Windows + R ->
type "cmd"
ipconfig
*unix:
ifconfig
Usually 192.168.0.1 or 192.168.1.1 are allocated to your router, which is what you are seeing via your iPhone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With