The fix is to specify the port in all of your VirtualHost & NameVirtualHost directives in your apache httpd config.
NameVirtualHost 196.168.1.100:80
NameVirtualHost 196.168.1.100:443
VirtualHost www.foobaz.com:80
VirtualHost www.foobaz.com:443
Yeah, the various distros call their config files different names – CentOS/RHEL use httpd.conf, and Ubuntu/Debian use apache2.conf.
However, I don’t recommend removing port 443 from your ports.conf file
I’d only do that if you don’t want to use SSL at all.
The key isn’t to remove ports, it’s to make sure that anytime an IP address or hostname is mentioned in a NameVirtualHost or VirtualHost definition, it’s also accompanied by a port.
sudo /etc/init.d/apache2 restart
Restarting web server: apache2[Fri Jan 15 14:43:11 2010] [warn] NameVirtualHost *:443 has no VirtualHosts
… waiting .[Fri Jan 15 14:43:13 2010] [warn] NameVirtualHost *:443 has no VirtualHosts
It’s possible that, if your users aren’t seeing any problems, tinkering with the config file may end up breaking more things than it’s fixing
You shouldn’t use “*” for anything in NameVirtualHost or VirtualHosts – you’d want to use explicit IP addresses and hostnames. Same with ports, don’t use a *, use the actual port names.