Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I see same url with localhost as remote server don't worked and with worked or vice versa.

I want difference between four form of server indicator in url address:

  1. localhost
  3. computer name
  4. ip

for sample Apache ActiveMQ web console url can shown as following forms in my computer:

  1. http://localhost:8161/
  3. http://mjm:8161/

(Sorry if I am using the wrong terminology or grammar, I am learning english language.)

share|improve this question
up vote 3 down vote accepted

It is all about address resolution.

Usually, http://localhost:8161 will access When you make the request to localhost, before making the DNS request, your OS will look at a HOSTS file (/etc/hosts in Linux) and will see there a rule that says that localhost maps to

Sometimes, localhost is mapped to a different IP, such as This may cause the malfunction between localhost and (eg. your service is configured to listen to localhost which is mapped to and you try to access

If you use a hostname, your OS may go further on the network stack, and may even make a DNS request to discover the host IP and then try to access that URL.

When you use the IP address your SO will try to access that URL using the given IP address.

share|improve this answer

Not quite sure if I get the question, but are you wondering what the diffrence between the 4 urls are?

If that is the case: (loopback IP for the local machine) localhost (resolves to the address)

^ the two above, are not accessible from other equipment in your network (other workstations++)

mjm and is in this case two ways of connecting to the same computer, accesible from the "outside".

If you want to connect to your Apache ActiveMQ from a diffrent workstation; computername or the 192.* IP would be the way to go.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .