httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <>
Subject Re: Apache config files and alternate config sources
Date Thu, 16 Aug 2001 09:46:58 GMT
Ryan Bloom wrote:

> If you use a pre-processor, then you can make a sane decision.  If the LDAP
> server isn't responding, don't tell Apache to restart.  If you get half-way through
> updating the config file on disk, don't try to restart Apache. If you mix the two,
> you open yourself up to more problems during error conditions.

> The code is easier if we keep these things separate, and we allow for a more
> robust server IMNSHO.

Hmmmm... you're 100% right - but I'm trying to figure out a way for all
of this to work elegantly that does not require any user confusion.

What could be done is that such a preprocessor stage be built into the
apachectl script. The graceful restart process would then be this:

1) run preprocessor on httpd.conf and generate a new file called
httpd.conf-<date> containing all registry keys, LDAP objects, external
files, whatever. If this fails - throw an error and don't restart.

2) run "httpd -f httpd.conf-<date> -t" to check if the syntax is
correct. If this fails - throw an error and don't restart.

3) run actual restart or graceful restart.

This way the user does not have to know or care about the checking
process - they make a config file that has Include directives that point
to either a windows registry or LDAP server and everything magically
works. There is no change to the Apache webserver code, only the
apachectl script.

The <date> bit allows a bit of audit trail to be created, but if this is
too much having a single file is fine. Thoughts?

-----------------------------------------		"There's a moon
					over Bourbon Street
View raw message