Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm setting up a local apache server. I use the xampp 1.7 package on windows. One site requires to be in the root directory, so i set up a virtual host to make it apear from root.

In the host file, i've added an entry (127.0.0.1 app.localhost).

I've added the virtual host to the apache conf:

<VirtualHost app.localhost:80>
    DocumentRoot "D:/Tools/xampp1.7/htdocs/ovs-v2"
    ServerName app.localhost

    <Directory "D:/Tools/xampp1.7/htdocs/ovs-v2/">
    	AllowOverride All
    	Options FollowSymLinks
    	Order allow,deny
    	Allow from all
    </Directory>
</VirtualHost>

The virtual host itself does work, when i go to app.localhost, i get the correct website. When I go to localhost, i get the normal webroot. But when I go to 127.0.0.1, i get the app.localhost website.

If i disable this virtual host, then all works normal. How can i fix this?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You're telling Apache that when it receives a request for a specific named host (VirtualHost app.localhost), it should respond with a specific configuration. Read more about name-based virtual hosts here:

http://httpd.apache.org/docs/2.0/vhosts/name-based.html

share|improve this answer
1  
Classic case of RTM before use. Thx. –  Ikke Oct 7 '09 at 10:46

Your Answer

 
discard

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.