简体   繁体   English

El Capitan无法通过LAN中的外部设备连接到Localhost服务器

[英]El Capitan Unable to Connect to Localhost Server Via External Device in LAN

Trying to test a local web app developed on my mac running El Capitan using my iPhone. 尝试使用我的iPhone测试运行El Capitan的Mac上开发的本地Web应用程序。 I'm able to pull up the web app using my internal ip on the actual mac, but when using another device connect to the same network it's not working. 我可以在实际的mac上使用我的内部IP来启动Web应用程序,但是当使用其他设备连接到同一网络时,它无法正常工作。 This use to work fine on previous versions of osx, but ever since upgrading to El Capitan, this hasn't been working properly. 这种用法可以在以前版本的osx上正常工作,但自从升级到El Capitan后,这种方法一直无法正常工作。

Any hints or solutions to this problem? 这个问题的任何提示或解决方案? Thanks 谢谢

I have a website on my Mac running off MAMP. 我的Mac上有一个网站在MAMP上运行。 I couldn't connect to it via IP on another computer. 我无法通过另一台计算机上的IP连接到它。 I turned off the firewall on the Mac and could connect by just typing in the IP into the address bar. 我关闭了Mac上的防火墙,只需在地址栏中输入IP即可连接。 Mine happened to be 192.168.1.69 . 我的碰巧是192.168.1.69 To get the actual website, I did have to include the port number, ie 192.168.1.69:8888 . 要获得实际的网站,我必须包括端口号,即192.168.1.69:8888 Make sure that you are using your private IP, not your public one (should start 192.168.XX or 10.XXX ). 确保您使用的是私有IP,而不是公共IP(应该启动192.168.XX10.XXX )。 This worked to connect from another computer and from my phone. 这适用于从另一台计算机和我的手机连接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM