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 added this line to /etc/hosts:

But when I access from a web browser, it doesn't go to the IP that I listed first. Any idea why?

share|improve this question
up vote 4 down vote accepted

The /etc/hosts file is about hosts and their names. It is used when resolving a domain name such as to a specific IP address. Howewer, it is not used when choosing which port to connect to; you cannot use host:port in it; the port must always be specified when connecting – i.e. in the browser.

share|improve this answer

You must log in to answer this question.

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