Tech Journal Back to Tech Journal

I got a warning NameVirtualHost *:80 has no VirtualHosts from httpd. Why?

The warning is:

NameVirtualHost *:80 has no VirtualHosts

In the Apache Wiki, there's a CommonMisconfigurations page, which says:

Multiple NameVirtualHost lines will yield a "NameVirtualHost *:80 has no VirtualHosts" warning. Apache will ignore the second directive and use the first defined NameVirtualHost line, though. This seems to happen when one is using multiple virtual host configuration files and doesn't understand that you only need to define a particular NameVirtualHost line once.

In other words, remove the multiple lines of the form:

NameVirtualHost *:80
Last updated on 2009-08-02 05:51:46 -0800, by Shalom Craimer

Back to Tech Journal