Has anyone noticed that Named Virtual Hosts do not function properly in Leopard Server? This appears to be a bug in the way the Server Admin GUI creates the conf files in /etc/apache2/sites:

  1. Each site has a configuration file preceded by a numerical index, i.e. 0000_default.conf.
  2. The virtual host config file is named virtual_host_global.conf.

Due to the way these conf files are included by httpd.conf, they are loaded in alphabetical order. This causes the virtual hosts file to be loaded last, when indeed it needs to be loaded first. The effect is that all sites after the first one are ignored.

To work around this issue we have implemented the following in both httpd.conf and httpd.conf.default: