Synopsis: Trying to access local web development server connected by WiFi to Android tether. Everything seems to be connected and operating correctly, but phone's web browser times out when accessing local server.

Context: I've got an Android device running android-wifi-tether. It works as advertised. I connect to it from my Ubuntu 12.04 laptop running Apache 2.2.22. The laptop is manually configured to IP in the hosts file. It can ping itself and access it's own web server through that address.

The WiFi tether hotspot gives the laptop the same address(Laptop was configured to match the hotspot address as a troubleshooting step, and could be wrong.) Using ping I can ping the laptop from the phone using the address. Using portscan the phone shows port 80 open on the address.

So, everything looks like it's in place, but any attempt to browse to fails after a few moments with a 504(Gateway time out)

Any help would certainly be help.

Update: I've install SSH and migrated to Nginx on the server. Portscan now shows ports 22 and 80 open. Using ConnectBot I can login and get my own shell on the server machine by IP address. This should indicate that the network is functioning properly.

I've also install the Dolphin browser on the phone to help verify that it's not an issue with the browser. Still I am curious if the browser is actually looking for the address first within the hotspot's IP space, or if it's looking to the internet, where that address will always time out.

I am very new to the Android scene. I would really appreciate some feedback as to how to get my phone browsing a tethered server. The workflow I'm looking for makes connection to a local server critical.

Thanks again.

Solution As I assumed, due to HTTP Proxy settings the web request was bypassing local addresses. I found that if I changed the tether network to 10.* IP range my provider responded with "access to this url has been blocked." That made it evident that something was blocking some requests, and more than likely also leaving the others to die out in the unroutable nether-net. Used HTTP Proxy Settings to clear out HTTP Proxy address.


Problem may be caused by HTTP Proxy server. Proxies help to manage web traffic on the providers end, but can and probably will disrupt access to local addresses. Proxy options may be available in your network settings, but on many phones these options are hidden. An app such as HTTP Proxy Settings will give access to the hidden settings. Simply clear out the hostname and port for un-proxied access. Make sure to write down original values so changes can be undone.


You need to set android-wifi-tether to give out IP addresses in a different subnet than the other networks your laptop connects to (e.g. home, work). You can do this within its Settings.

You also need to set up your web server to listen on the given address. Based on your description you are most likely using nginx; in that case add listen; to the appropriate server block.

  • That doesn't seem to be the issue. I am not connected to any other networks. I did just switch back to on the laptop and the problem persists, as it did before I had changed to the ..2.100 address. Ping and portscan both show the laptop being addressable, yet the browser times out. – BentFX Sep 4 '12 at 3:46
  • Did you configure your web server correctly? See updated answer. – Michael Hampton Sep 4 '12 at 3:52
  • I'm running Apache as originally stated. I think I'm configured correctly, set to Listen 80 and *:80 as virtual host name. As I understand it that will catch anything on port 80. – BentFX Sep 4 '12 at 4:11
  • Sorry Mike, I figured things out better. You were mostly correct. I can't assign an IP to a machine, only to a network device. What I had done in the hosts file only put a name on that IP address, and as I learned better that IP is not reachable if the WiFi connection is down. I did understand that the IP couldn't be assigned to another device, I failed to understand that if the WiFi was down the IP wasn't assigned to any device. My Bad. – BentFX Sep 5 '12 at 1:01

Your Answer

