Apache Warn NameVirtualHost *:80 Has No VirtualHosts Error When Start
When start Apache web server or restart the HTTPD service on web host, the following warning message may appears on console or error log, even though Apache HTTP service can still startup and running fine without error.
[warn] NameVirtualHost *:80 has no VirtualHosts
where * can be asterisk itself (*), hostname or IP address.
Luckily the message is just a warning message and does not affect the functionality of web server, and hence the websites hosted on the server can still be served properly. The possible cause for this problem’s symptom is incorrect use of NameVirtualHost.
When the server, dedicated or virtual private server web host, has only one IP address, websites are hosted by Apache via name based virtual hosting. In this case, there should be only one NameVirtualHost been defined. For example,
NameVirtualHost *:80
<VirtualHost *:80>
servername host
serverPath /public_html/
DocumentRoot /public_html/
</VirtualHost>
The name of one or more virtual hosts (websites’ domain name) is defined by “servername” directive. So if you have more than one websites hosted on a single IP address, you will have one NameVirtualHost declaration and many VirtualHost sections to configure those domains.
Beside, try at best to use IPs or * for the NameVirtualHost and <VirtualHost> directives. In some cases, where the website is assigned a dedicated IP address where only one virtual host is declared, the NameVirtualHost can even be dropped.
For more example on how VirtualHost supposed to be setup, visit Apache 2.2 documentation or Apache 1.3 documentation (more common version of Apache used currently as most control panel such as cPanel comes with this, although it’s going to be upgraded in cPanel 11).
Share and contribute or get technical support and help at My Digital Life Forums.
Related Articles
- Request URL /server-status or 404 Page Not Found Apache Error
- cPanel WHM Failed to Receive Status Information From Apache Error
- winnt_accept: Asynchronous AcceptEx failed Error in Apache Log
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 4
- FreeBSD Apache HTTP Accept Filter Error
- Apache Status (whm-server-status) in cPanel WebHost Manager Returns Blank Page
- Starting Apache HTTPD Failed Due to Cannot Open or No Such mod_bwlimited, mod_log_bytes or mod_bandwidth Files
- gmmktime Error in WordPress and MagpieRSS
- Subversion (SVN) Issues and Problems on mod_dav_svn in FreeBSD
- PHP Parse Error: syntax error, unexpected $end

































August 20th, 2007 19:30
[...] people on the web say stuff like ‘change the *:80 to a _default_:80′ or similar - focusing on tricking [...]
July 10th, 2008 19:05
[...] Still, now that I’m running my own VPS, I might as well get it fixed. So here’s it. [...]