繁体   English   中英

如何通过wifi wampserver访问android上的localhost?

[英]How to access localhost on android over wifi wampserver?

使用 Wampserver 和 Windows,我想通过 wifi 访问 android 上的 localhost。

我电脑的 ip 是192.168.0.20 山姆无线网络。

我在C:\wamp64\bin\apache\apache2.4.39\conf\extra\http-vhosts.conf上添加了Require ip 192.168.0 (同样的问题,如果我添加了 Require all grant')

<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Require local
    Require ip 192.168.0
  </Directory>
</VirtualHost>

但是当我尝试从我的手机 android (相同的 Wifi 网络)访问它时,我有这个错误:

无法访问此站点

192.168.0.20 响应时间过长。

尝试:

检查连接

ERR_CONNECTION_TIMED_OUT

你能帮助我吗?

you need to map the localhost to your computer ip Address, you need to get the ip address from the ipconfig cmd command and you need to check your firewall

暂无
暂无

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

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