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

问题描述 投票:0回答:1

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

我的计算机的IP为192.168.0.20。山姆wifi网络。

[我在Require ip 192.168.0上添加了C:\wamp64\bin\apache\apache2.4.39\conf\extra\http-vhosts.conf(如果我添加了要求所有授予的权限,则存在相同问题)]::>>

<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

你能帮我吗?

使用Wampserver和Windows,我想通过wifi访问android上的localhost。我计算机的IP是192.168.0.20。山姆wifi网络。我在C:\ wamp64 \ bin \ apache \ apache2.4上添加了Require ip 192.168.0 ....

android apache networking localhost
1个回答
0
投票

您需要将localhost映射到您的计算机IP地址,需要从ipconfig cmd命令获取IP地址,并且需要检查防火墙

© www.soinside.com 2019 - 2024. All rights reserved.