🔥 Holiday Sale! 25% Off Platinum Membership and up to 50% Off on Deployarr (ends December 31).

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.

Be the 1 in 200,000. Help us sustain what we do.
129 / 150 by Dec 31, 2024
You will gain benefits such as Deployarr access, discord roles, exclusive content, ad-free browsing, and more.
🔥 Holiday Sale! 25% Off Platinum Membership $399.99 $299.99 (ends December 31).
Join the Geek Army (starting from just $1.67/month)

Anand

Anand is a self-learned computer enthusiast, hopeless tinkerer (if it ain't broke, fix it), a part-time blogger, and a Scientist during the day. He has been blogging since 2010 on Linux, Ubuntu, Home/Media/File Servers, Smart Home Automation, and related HOW-TOs.

Holiday Sale