Server Fault is a question and answer site for system and network administrators. 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

my windows 7 hosts file has this...

and my apache http-vhosts.conf file has this...

<VirtualHost *:80>
DocumentRoot "E:/Server/htdocs/myframework"

It almost works as I want it except it is wrong.
Now when I go to "" or "" it does load the "E:/Server/htdocs/myframework" page as I want it to, however now when I got to "localhost" it always loads "E:/Server/htdocs/myframework" instead of localhost/the-directory-i-want or file i want

Anybody know why or better, how I can make it work how I would expect it?

share|improve this question

closed as off topic by Iain, Scott Pack, freiheit, Ward, sysadmin1138 Dec 17 '12 at 3:28

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 3 down vote accepted

If you only have that one vhost set up then it will serve eveything. You could set up a localhost vhost

<VirtualHost *:80>
    DocumentRoot "E:/Path/To/localhost"
    ServerName localhost

Also Your hosts file can have the hosts all on one line localhost
share|improve this answer
thanks for the response and the tip on the 1 line for hosts,however, I have tried this and it still routes everything E:/Server/htdocs/myframework instead of E:/Server/htdocs/ ... any other ideas? And yes I restarted Apache, thanks again – JasonDavis Aug 11 '11 at 21:23

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