-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
mick wrote:
However, your question got me thinking and I have done some checking with my own setup. I deliberately introduced some syntax errors in the configuration of a virtual server and tested with "lighttpd -t -f configfile" (the lighty equivalent of of apache2 -t) and found that I could get an error through the testing ("syntax ok") which would then cause the server to fail to reload.
So the problem is not confined to apache unfortunately.
It's the classic case of unit testing (seeing if the config passes basic syntax checks) versus integration testing (running the thing to check that the whole lot doesn't fall over). Short of actually starting the server up it's never going to know if it has, for instance, appropriate file-system permissions, config-specified directories in place (my favourite error is defining a custom log directory and failing to create it first - Apache fails to start, silently), unimpeded access to the port it's going to run on, etc, etc.
For this reason, if you're using Apache (or any webserver) for anything public-facing or "serious", it's always a good idea to have a mirror development system you can /really/ test config on first, before deploying it to the world.
Hth, Simon
- -- - --------------------------------------------------------------------- Simon Ransome http://nosher.net
Photography RSS feed - http://nosher.net/images/images.rss