Q:

My Apache virtualhosts is acting up

my windows 7 hosts file has this...
127.0.0.1     www.testing.com
127.0.0.1    testing.com

and my apache http-vhosts.conf file has this...
<VirtualHost *:80>
DocumentRoot "E:/Server/htdocs/myframework"
ServerName testing.com
ServerAlias www.testing.com
</VirtualHost>

It almost works as I want it except it is wrong.
Now when I go to "testing.com" or "www.testing.com" 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?

A:

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
    ...
</VirtualHost>

Also Your hosts file can have the hosts all on one line 
127.0.0.1 www.testing.com testing.com localhost

