Softprayog.in

Apache Webserver Warning message

Error: [warn] NameVirtualHost *:80 has no VirtualHosts

Solution:

It means that although there was a NameVirtualHost directive in the configuration files, the corresponding VirtualHost directives were not found. How is that possible when you put the VirtualHost directives in the configuration files yourself? Actually, there are multiple configuration files. So a possible scenario is that there is a NameVirtualHost directive in apache2.conf and also in ports.conf. apache2.conf includes ports.conf. The Apache web server finds two NameVirtualHost directives in succession without any VirtualHost directive.

To get rid of the warning, delete the surplus NameVirtualHost directive(s).