开发者

Accessing localhost from iPhone (in same network)

开发者 https://www.devze.com 2023-02-26 04:37 出处:网络
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.

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 XAM开发者_如何学GoPP 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?


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.


192.168.1.1 sounds like it's your router's IP not your Mac's. Try running ifconfig in a terminal to find out your Mac's actual IP address. It's probably something like 192.168.1.2.


Are you sure the IP of your computer is 192.168.1.1 ? It seems like 192.168.1.1 is your DSL router.

In that case, maybe XAMPP is asking for password?

Other reason may be that your router is not letting lan computers access each other...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号