简体   繁体   中英

Can't connect to WAMP server from Android device

I'm trying to connect to my laptop's WAMP localhost from an Android device. 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.

I've tried using my laptop's IP address, but it couldn't find the wamp index page.

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

  • Apache Version :2.4.9
  • PHP Version: 5.5.12
  • Server Software: Apache/2.4.9 (Win64) PHP/5.5.12
  • MySQL Version: 5.6.17

Here is my httpd.conf config file: Link to pastebin

Some things to try: 1. Make sure the firewall on the laptop will allow the android device through. You might just need to add an ip exception. 2. Make sure the firewall will allow for the service on the laptop to be accessed. It might just be allowing port 80 (or whatever port the WAMP server is set up on). It might also mean the WAMP executable. 3. Make sure the android is on the same subnet as the laptop. If not, and you cannot change it, you may need to do port forwarding on any routers between the android and laptop. (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; try to access the WAMP server on the same laptop using the ip address and port for the WAMP server instead of localhost.

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. You might want to make sure the WAMP server is only running while you are testing, and you change your firewall back after testing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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