0

Situation: on PC installed server, and available address with this site: http://localhost And installed Connectify Hotspot to share internet via wi-fi.

Also, I have android-device from which I need visit localhost on my PC. Via wi-fi is not principal.

How I can do this? I have read a lot of instructions, but they are for AVD (through 10.0.2.2), that I could do, but not with real device.

user2017037
  • 80
  • 11

2 Answers2

1

I made it.

  1. Disable firewall while you testing connection.
  2. Define your wi-fi IP-address by ipconfig.
  3. On local server you need to create folder with this IP-address and put in this folder site or something, you want to open through wi-fi on mobile.

example: 192.168.77.1/www/index.php

  1. Restart your server. After this you will be able to access to your site in PC-browser by your wi-fi IP-address. If not - restart server another once, or something going wrong :)
  2. Turn on mobile wi-fi and in browser try to access to wi-fi IP-address. Profit.
user2017037
  • 80
  • 11
0

localhost on the device refers to the device itself, not to your computer. Get your computers IP address (ifconfig on linux or mac systems) and use this instead of localhost.

SimonSays
  • 10,867
  • 7
  • 44
  • 59
  • I have tried this. ipconfig -> wireless connection -> ipv4-address And nod32 firewall disabling doesnt help. – user2017037 May 22 '13 at 17:12
  • try to access your computer with the device browser first to see if it is blocked somehow. If you can not access it, it's not an android problem, but some configuration problem with your computer of wireless. – SimonSays May 22 '13 at 17:36
  • I have tried enter in mobile browser ip of PC wifi - no result. "Error link not found". By the way, I tried to enter it in PC browser - the same result. I dont understand, is it blocked or something else. And if it blocked - by what? If it matters, I can go online on mobile via PC-wifi - nothing blocked. – user2017037 May 23 '13 at 03:15