Home » Home Server » NameVirtualHost *:80 has no VirtualHosts – Apache

NameVirtualHost *:80 has no VirtualHosts – Apache

written by Anand May 1, 2012

When upgrading from one version of Linux (Ubuntu in my case) to another or while transferring your websites to a clean install it is common to encounter the following warning while starting/restarting apache:

NameVirtualHost *:80 has no VirtualHosts

This happens when hosts are defined in both /etc/apache2/sites-available/default as well as /etc/apache2/ports.conf.

SOLUTION:

Comment out the the following lines in /etc/apache2/ports.conf:

#NameVirtualHost *:80
#Listen 80

Then restart your apache using the following command and you should not see the warning.

sudo /etc/init.d/apache restart

Thats it.

Write for Us: Competitive pay. Familiar with Smart Home Automation, Media Streaming, HTPC, and Home Server topics? Tinkerers and hobbyists preferred. Writing experience not required. APPLY HERE.
Did this post help you?
SmartHomeBeginner brings in-depth tutorials easy enough to understand even for beginners. If you are reading this, please consider buying us a coffee (or two) as a token of appreciation.

Related Articles