Checking apache conf syntax
Finally, Debian now does this when you /etc/init.d/apache2 reload, rather than silently failing and killing your websites.
For a long time, I've been meaning to make a patch to the force-reload part of /etc/init.d/apache2, so that it performs an apache2 -t, to test if the new configuration files have valid syntax, and aborts the reload if there is an error, rather than silently killing your websites dead in their tracks. However, it seems that Debian or upstream have beaten me to it, as my init file (2.2.9-10+lenny2) seems to have this feature.
However, I don't seem to test the syntax of a conf file without reloading Apache. I get this error when running apache2 -t:
apache2: bad user name ${APACHE_RUN_USER}
The following command does the right thing though:
/usr/sbin/apache2ctl configtest




comments
The ${APACHE_RUN_USER} error is a known issue in Lenny: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=534675