March 12, 2010

158 words 1 min read

Annoyance of ‘NameVirtualHost *:80 has no VirtualHosts'

For some reason, in Ubuntu, the Apache default configs seem to include a plethora of calls for ‘NameVirtualHost *:80’. It seems that the very second you install Apache, it starts complaining about ‘NameVirtualHost *:80 has no VirtualHosts’. While this is just a warning and can be safely ignored, it is a brand new box and you probably want it to run nicely. I know I do. So I started hunting. I removed all calls for “NameVirtualHost *:80” in ./apache2/sites-enabled/ and that didn’t seem to help, there were still warnings about it. Turns out there is one extra call tucked away.

Go into /etc/apache2/ports.conf, find and comment out: “NameVirtualHost *:80”

Piece of cake, if you know where to look. Really Apache should give file names with your warnings, but that would make it user friendly. We can’t have just any old peon being able to work Apache, that might run some Linux geeks like me out of a job.