Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

On my localhost I'm trying to map to Hosts file is below.

When I load I see what I want but for I just see Firefox's Server not found page.

What's wrong with my hosts file?

# Host Database
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##       localhost broadcasthost
::1             localhost
fe80::1%lo0     localhost
share|improve this question
up vote 4 down vote accepted

The hosts file maps names to IP addresses. You cannot put ports or paths in there.

share|improve this answer
So is it possible at all to map to ? – user39822 Oct 10 '11 at 8:04
From my reading of the question, xe already has a content HTTP server there. Xe wants to pretend that that has a real domain name, presumably for testing out a WWW site privately before uploading the pages to the main public content server. – JdeBP Oct 10 '11 at 9:57

In your local hosts file, replace your


then you can visit

If you want to retrieve the same site, you can configure your webserver to also listen on port 80 (as well as 8888) and configure virtual hosting in which case the webserver can use the HTTP headers passed by the client (Host: to identify the required site.

How you do this depends on the webserver you use. For Apache see the documentation for Listen and Virtual Hosts

To make testing easier - use relative URLs throughout the site content. It shouldn't normally be necessary to do what you are asking.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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