Access localhost from iPhone (on the same network)

I want to test my iPhone application developed in localhost (XAMPP) on my iPhone. My system IP address is 192.168.1.1 on the local network.

When I visit http://192.168.1.1:80 in a browser, it says: "For server 192.168.1.1 ::::::::::::::::::::::

I thought it should be my XAMPP username / password, but it looks like it is not, and it shows a 404 error.

Both my system and my iPhone are on the same network. So where am I doing this wrong?

+9
iphone localhost
Apr 14 '11 at 15:55
source share
3 answers

Make sure your IP address is correct for your host computer.

Windows: Windows + R -> type "cmd"

 ipconfig 

* UNIX:

 ifconfig 

Usually 192.168.0.1 or 192.168.1.1 are assigned to your router, which you see through your iPhone.

+7
Apr 14 '11 at 15:59
source share

Are you sure the IP address of your computer is 192.168.1.1? 192.168.1.1 seems to be your DSL router.

In this case, maybe XAMPP asks for a password?

Another reason may be that your router does not allow like computers to access each other ...

+2
Apr 14 2018-11-11T00:
source share

192.168.1.1 sounds like your IP address is your router, not your Mac. Try running ifconfig in the terminal to find out your actual Mac IP address. This is likely similar to 192.168.1.2.

+1
Apr 14 2018-11-11T00:
source share



All Articles