Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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>
        ServerName site1.domain.com
        DocumentRoot /var/www/site1/public

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

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
1  
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
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.