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

Apache's NameVirtualHost has been configured in httpd.conf as such:

NameVirtualHost *:80

However, the sites are still defaulting to the first virtual host, despite the VH configs looking correct. They are all following the following template (where 'site1' is the name of the site):

<VirtualHost *:80>
        DocumentRoot /var/www/site1/public

        <Location />
         AuthName "Login Required"
         AuthType Basic
         AuthUserFile /var/www/site1/private/htpasswd
         Require valid-user

Conf checks show no syntax errors and restarting Apache doesn't generate any errors. Quite frankly, I'm a bit stumped. The config setup is the same as other servers, yet only this one has this issue.

Is there anything else I can check?

share|improve this question
Try httpd -S. – Gnarfoz Aug 3 '12 at 15:37
All of the VHs that are supposed to be configured show up, so it's not a case of a config not beign loaded :( – Marcus Aug 6 '12 at 8:58

Your Answer


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

Browse other questions tagged or ask your own question.