1

While experimenting with the Bit Web Server app I have noticed that when I attempt to access my device's localhost, the connection seems to be sent somewhere else.

Using the localhost button in the app sends me to http://localhost:8080, however this displays a blank page, whilst removing the port number takes me to a page that has the following written on it: Bytemobile Dummy Web Server.

When accessing http://localhost:8080 with no connection (WiFi and Data are turned off) I simply get Unable to connect to the proxy server.
I can however connect to my device's localhost fine when connected to WiFi.

Why can I not connect to my device's localhost? Surely it should not need a connection for it to connect to itself. Why does it only work when WiFi is enabled and how do I change this behavior?

  • This is rather a networking question, and not specific to Android. If you ommit the :8080, this corresponds to using :80, which is the port a web server usually listens to. Most likely reason for your error is: there's nothing listening on port 8080. – Izzy Dec 18 '13 at 10:48
  • Bit Web Server is listening to :8080 by default.I expected :8080 to display the webpage and :80 to not connect. Since disabling the proxy in my APN setting everything is working as expected. – Crowda Dec 18 '13 at 11:03
1

The clue is in the error message, which says it can't connect to the proxy server. If your device is configured to use a web proxy, then it'll never connect directly to localhost: it connects to the web proxy and asks that for the web page you really want. This won't work with a local web server.

To use a local web server, turn off your web proxy settings. See this related question for more info about that.

  • Thanks, turns out my problem was a little different. It was a proxy but it was in my APN settings. – Crowda Dec 18 '13 at 10:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.