I'm running a stock Debian Lenny install with Apache 2. I've noticed that in /etc/apache2/ports.conf there's the following directive:
NameVirtualHost *:80
I don't have any virtual hosts on *:80 because of the way things are set up on the server (multiple IP addresses, some load balanced, some hosts running http, others using https) and I have the following line in another file:
NameVirtualHost www.xxx.yyy.zzz:80
Where www.xxx.yyy.zzz is the IP address I want these sites to respond on. Every VirtualHost container uses that IP address if running http, and the https hosts use a unique IP address for each host and on port 443 so don't need a NameVirtualHost directive. Because I don't have any virtual hosts with *:80, Apache throws up the following warning when I reload/restart:
[warn] NameVirtualHost *:80 has no VirtualHosts
I want to effectively tell Apache "if you've seen a NameVirtualHost *:80 directive already, ignore it" in a configuration file which is included later down the line (after ports.conf). Is this possible? I know I could just comment out the line in ports.conf, but that means editing a file which is supplied by Debian, and I prefer to put customisations in separate files to avoid problems when Apache is upgraded and apt throws up a message saying that the configuration has changed.