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

NameVirtualHost *:80 has no VirtualHosts – Apache

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.

We Are Hiring: Familiar with Media Streaming, HTPC, Home Server, Smart Home, and Home Automation topics? Write about it and earn money. No writing experience needed. APPLY HERE.

Get 20% OFF with IPVanish VPN:

♦   Hide your browsing and streaming activity: No logs and no tracking
♦   Access geo-restricted content from anywhere
♦   Encrypt and anonymize: Kodi, Plex, Downloads, Personal Info
♦   Windows, Mac, Linux, Android, iOS, Router, and more.
♦   Money back guarantee - Sign Up Now

About the author

Anand

Anand is a self-learned computer enthusiast, a part-time blogger, and a Food Scientist by career. He has been blogging since 2010 on Linux, Ubuntu, Home/Media/File Servers, Smart Home Automation, and related HOW-TOs on htpcbeginner.com and smarthomebeginner.com.

Archives

Join the other 110,000 followers