Tag: localserver

连接设备到Mac本地主机服务器?

如何让任何设备(例如iPhone)通过WLAN连接到我的Mac的本地主机服务器? 在我的Mac上,我正在运行一个“Hello World”HTTP Node.js服务器,该服务器在http://localhost:1337上提供一个成功打开Safari的页面。 并且,在terminal输出192.168.1.9运行ipconfig getifaddr en1 。 但是,在iPhone和Mac上,Safari在尝试打开http://192.168.1.9:1337时显示“Safari无法连接到服务器”。 我不认为这应该涉及端口转发,因为我只希望HTTP服务器是私有的,而不是公开的。 有关: 从iPhone访问本地主机(在同一networking中) https://superuser.com/questions/308451/connect-to-localhost-from-another-computer https://superuser.com/questions/400752/can-we-run-local-server-over-local-network-without-internet-access https://serverfault.com/questions/254947/accessing-localhost-xampp-from-another-computer-over-lan-network-how-to