如何让iPhone上的ios浏览器查看本地服务器上的网页进行测试?
我有一个 iOS 设备。我正在开发一些 html 5 页面,我想在开发时在我的 iPhone 上查看这些页面。这可能吗。我尝试访问本地服务器的 IP,但无法连接。我不确定是否还有其他我应该尝试的事情。
我还尝试了我的 Android 设备 evo shift 4g 和同样的事情......它无法使用 IP 连接。
有什么想法吗?
I have an iOS device. I'm developing some html 5 pages that I'd like to view on my iphone while developing. Is this possible. I tried accessing my local server's ip and it wouldn't connect. I'm not sure if there's something else I should try.
I also tried an my Android device evo shift 4g and same thing...it wouldn't connect using the ip.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
本地服务器是否运行正确配置的 apache 或其他服务器软件?您可以从本地服务器本身的浏览器访问本地页面吗?防火墙是否允许端口 80 连接进入?
Is the local server running correctly configured apache, or some other server software? Can you access the local pages from a browser on the local server itself? Is the firewall letting port 80 connections in?
WiFi 设备是否与服务器位于同一子网中?电话的 IP 地址是多少?如果您有一个无线路由器连接到有线路由器,并且该无线路由器正在运行自己单独的 DHCP 服务器,则可能会发生这种情况。您是否在连接到无线网络的计算机上进行了测试?
不应该有任何东西阻止 iPhone 或 Android 手机连接到它可以解析的 IP 地址。我从 iPhone 或 Android 手机连接到(公共)IP 地址时从未遇到过问题。
Are the WiFi devices in the same subnet as the server? What are the IP addresses of the phones? That could happen if you have a wireless router connected to a wired router, and the wireless router is running its own separate DHCP server. Have you tested from computers that are connected to the wireless network?
There shouldn't be anything that prevents an iPhone or an Android phone from connecting to an IP address that it can resolve. I've never had a problem connecting to a (public) IP address from either an iPhone or an Android phone.
我在 Windows 7 Professional 上运行 IIS 7。有同样的问题。这是防火墙问题。转至控制面板\所有控制面板项目\Windows 防火墙\允许的程序,然后为“家庭/工作(私人)”启用“万维网服务 (HTTP)”。这对我有用。由于我的 iPhone 在同一网络中,我现在可以通过 IP 访问我的测试服务器。
I'm running IIS 7 on Windows 7 Professional. Had the same problem. It's a firewall issue. Go to Control Panel\All Control Panel Items\Windows Firewall\Allowed Programs and enable "World Wide Web Services (HTTP)" for "Home/Work (Private)". That worked for me. As my iPhone is in the same network, I now can access my test server by its IP.