简体   繁体   English

无法从Android设备连接到WAMP服务器

[英]Can't connect to WAMP server from Android device

I'm trying to connect to my laptop's WAMP localhost from an Android device. 我正在尝试从Android设备连接到笔记本电脑的WAMP本地主机。 But I still couldn't get it through. 但是我仍然无法通过。

Both machines are connected to the same wifi, and I think it should be okay since it shares the same router. 两台机器都连接到相同的wifi,我认为应该没问题,因为它共享同一台路由器。

I've tried using my laptop's IP address, but it couldn't find the wamp index page. 我尝试使用笔记本电脑的IP地址,但找不到wamp索引页面。

I know there has been a lot of similar questions before, I've tried numerous solutions but still cannot make it work. 我知道以前有很多类似的问题,我已经尝试过许多解决方案,但仍然无法使它起作用。

I'm using WAMP 2.5 with 我在使用WAMP 2.5

  • Apache Version :2.4.9 Apache版本:2.4.9
  • PHP Version: 5.5.12 PHP版本:5.5.12
  • Server Software: Apache/2.4.9 (Win64) PHP/5.5.12 服务器软件:Apache / 2.4.9(Win64)PHP / 5.5.12
  • MySQL Version: 5.6.17 MySQL版本:5.6.17

Here is my httpd.conf config file: Link to pastebin 这是我的httpd.conf配置文件: 链接到pastebin

Some things to try: 1. Make sure the firewall on the laptop will allow the android device through. 请尝试以下操作:1.确保笔记本电脑上的防火墙允许android设备通过。 You might just need to add an ip exception. 您可能只需要添加ip异常。 2. Make sure the firewall will allow for the service on the laptop to be accessed. 2.确保防火墙允许笔记本电脑上的服务被访问。 It might just be allowing port 80 (or whatever port the WAMP server is set up on). 它可能只允许端口80(或在WAMP服务器上设置的任何端口)。 It might also mean the WAMP executable. 这也可能意味着WAMP可执行文件。 3. Make sure the android is on the same subnet as the laptop. 3.确保android与笔记本电脑位于同一子网中。 If not, and you cannot change it, you may need to do port forwarding on any routers between the android and laptop. 如果没有,则无法更改它,您可能需要在android和笔记本电脑之间的任何路由器上进行端口转发。 (Forward to the port the WAMP server is listening on.) 4. Try other things that you know work - eg a different laptop/computer on the same subnet trying to access the WAMP server; (转到WAMP服务器正在侦听的端口。)4.尝试其他您知道可以做的事情-例如,在同一子网上的另一台便携式计算机/计算机试图访问WAMP服务器; try to access the WAMP server on the same laptop using the ip address and port for the WAMP server instead of localhost. 尝试使用WAMP服务器的ip地址和端口而不是localhost访问同一台笔记本电脑上的WAMP服务器。

Just be fully aware of the security implications of the above. 只是要充分意识到上述安全隐患。 Opening firewall ports and having a web server on your laptop increase security risks. 打开防火墙端口并在便携式计算机上安装Web服务器会增加安全风险。 You might want to make sure the WAMP server is only running while you are testing, and you change your firewall back after testing. 您可能要确保WAMP服务器仅在测试时才运行,并且在测试后将防火墙改回来。

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

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