简体   繁体   English

通过wifi访问Android设备中的本地主机网站

[英]Access local host website in Android device through wifi

I am developing one website which is need to host in local system and access this website in all device through WiFi. 我正在开发一个需要在本地系统中托管并通过WiFi在所有设备中访问该网站的网站。 My system in which I publish website in IIS is Connected in LAN. 我在IIS中发布网站的系统是LAN中的Connected。 And WiFi is also from same router. 而且WiFi也来自同一台路由器。

I need to access this website in all device which is connected in WiFi. 我需要在所有通过WiFi连接的设备中访问此网站。 How can I achieve this? 我怎样才能做到这一点? If you have any other suggestion to do this than than please let me know. 如果您有任何其他建议,请告知我们。

You need to add an inbound rule in the firewall for port 80 (or whatever port you used for your website on IIS): 您需要在防火墙中为端口80(或您在IIS上用于网站的任何端口)添加入站规则:

  • Go to Control Panel, Windows Firewall 转到控制面板,Windows防火墙
  • Select Inbound Rules 选择入站规则
  • Add a New Rule 添加新规则
    • Select "Port" as a Rule Type 选择“端口”作为规则类型
    • Select "TCP and put "80" (and any other ports you want to open) in "Specific local ports" 在“特定本地端口”中选择“TCP并放置”80“(以及您要打开的任何其他端口)
    • Select "Allow the connection" 选择“允许连接”
    • Select the network location where the rule should apply 选择应用规则的网络位置
    • Give a name and an optional description 提供名称和可选说明

After that you should be able to access your site from other devices in the same network using http://computername (eg http://myhomepc ) 之后,您应该能够使用http://computername (例如http://myhomepc )从同一网络中的其他设备访问您的站点

转到Windows防火墙,只关闭防火墙“公共网络设置”...现在你将使用当前电脑的IP访问你的网站,如http://192.168.1.200/SOCH/ ....... SOCH是我的项目文件夹

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

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