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

On my local development machine (Windows 7), I am using IIS and XAMPP to develop websites. Because it is unclear when I have multiple websits running, I am tried to rewrite the hosts file (C:\Windows\System32\drivers\etc). I added this following line of code       joomla

Navigating my browser (I tried it with IE and FF) to works fine, but just typing in "joomla" won't work. I get immediately redirected to Google (i.e. Also specifying other ports doesn't work (for example: "localhost:8080 someproject" for IIS).

Is there a reason why it won't work? Are there other solutions which also accomplish my "problem" (easier handling with dozen of local running websites, i.e. "more readable URLs")?

share|improve this question

migrated from Jul 21 '12 at 13:14

This question came from our site for system and network administrators.

You mention that you are using both IIS and Apache (the A in XAMPP). Are they listening on two different ports, or is only one of the two actually working? XAMPP is designed to be a self-contained Apache/MySQL/PHP stack for development/experimentation purposes and I have never heard of anyone integrating it with IIS. – Miles Erickson Apr 19 '12 at 18:13
Yea, there's no integration of the two. They're separate, fully contained web server platforms. I'm wondering if he has a site running on port 80 in both platforms? That would cause one or the other to not function. – JohnThePro Apr 19 '12 at 18:53
Did this help you, System? – JohnThePro Apr 20 '12 at 20:35

Don't put the slash. You can define multiple host names for, but it's done in this format:      hostname      joomla      thatotherwebsite

Once you do the entries in the hosts file, that's all you should need to do. Afterwards, return to your browser, type in the name of the site you want, and good to go.

PS - You'll also need to be running these websites on IIS or Apache that will allow you to define hostname binding per website. Then your web server will deliver the correct site for the name provided. The links provide information for both platforms about how to accomplish this.

share|improve this answer
The requirement for hostname binding is not a specific reason to use IIS. – Miles Erickson Apr 19 '12 at 14:34
I said IIS or something similar. He's running a Windows OS, so there's really no reason to download an extra tool when IIS is built in. – JohnThePro Apr 19 '12 at 14:36

DNS only maps domain names to IP addresses. It doesn't know anything about file paths.

In your hosts file, you can map the name "joomla" to and then configure Apache to handle requests for "http://joomla/" however you like.

share|improve this answer
You do see that he said at the top of his question that he is using IIS right? – JohnThePro Apr 19 '12 at 14:37
Oh dear, you're right. The question indicates use of both IIS and Apache... but listening on which ports? Hmm. – Miles Erickson Apr 19 '12 at 17:04
The listening ports would be defined in IIS as well. The modifications to the hosts file would have no bearing on that. (PS - It just dawned on me the A in XAMPP) :) – JohnThePro Apr 19 '12 at 17:11

You must log in to answer this question.

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