Possible Duplicate:
How does localhost work?

I'm wondering how does localhost:8080 works? Who is sitting behind the scenes and handling my request's? How all request's are handling simultaneously and who does this job?

  • Is this a serious question? – jathanism Jun 19 '12 at 5:41
  • @jathanism: yes it is! – Ant's Jun 19 '12 at 5:47

Localhost actually is aliased to in hosts.txt in many systems. You need some kind of server listining to that port of course, and any request there gets sent to the loopback adaptor in linux or its equivilent in windows.


Any program running on your computer can answer a network request on a port that isn't already in use. "Localhost" is a "Well known" address meaning the local machine, via IP address

Now, which program running on your computer is listening to port 8080? I don't know. Determining that depends on your hardware and software.

http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers says that 8080 is often used for proxy and caching programs as well as Apache, which is web server software you can choose to run. But it could be anything.


Your operating system's hosts file contains this entry:       localhost belongs to the loopback network interface, which is available whether you have an actual network connection or not. You can therefore run a web server and tell it to listen for connections on port 8080 to the address, which you can connect to even when disconnected from the Internet.

The :8080 part of the URL tells your web browser to connect to port 8080 rather than the usual port 80 used for HTTP connections. Developers often run local web servers on port 8080 because Unix-like systems (Mac OS X and Linux) only allow the user "root", the "superuser", to listen for connections to port numbers below 1024. (8080 is greater than 1023, allowing the developer to run the server from his own user account rather than as a system service.)


In computer networking, localhost (meaning this computer) is the standard hostname given to the address of the loopback network interface


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