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

My conf file:

NameVirtualHost *:80

<VirtualHost *:80>
        ServerName test.example.com
        DocumentRoot /var/www/test
</VirtualHost>

<VirtualHost *:80>
        ServerName example.com
        ServerAlias www.example.com
        DocumentRoot /var/www
</VirtualHost>

It works, but I get this warning message on reboot:

[warn] NameVirtualHost *:80 has no VirtualHosts

Anyone know why? Thanks!

share|improve this question

2 Answers 2

up vote 0 down vote accepted

(Did you reload or restart apache after making the changes?)

Check to see if the NameVirtualHost line already exists elsewhere in the configuration

share|improve this answer
    
Yes, that's why I got the warning message "on reboot." The config worked (not sure what the issue was), but I still get the warning... –  ash Jun 27 '10 at 21:23
2  
Check to see if the NameVirtualHost line already exists elsewhere in the configuration. –  lladnar Jun 27 '10 at 21:43
    
This worked, thanks. –  ash Jun 27 '10 at 23:10

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.