httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <>
Subject Re: Apache config files and alternate config sources
Date Thu, 16 Aug 2001 07:42:34 GMT
On Wednesday 15 August 2001 11:11, Graham Leggett wrote:
> Ryan Bloom wrote:
> > This has been discussed before, and was the original goal for the
> > configuration tree approach.  The decision in the past has always been
> > that Apache config files are stored text files.  If you want to store
> > them somewhere else, then create a pre-processor to grab the config data
> > from some other location, and store it in a text file.  In fact, this
> > idea was vetoed the last time Greg Stein and I brought it up.  Take a
> > look through the list archives from just after the London ApacheCon, at
> > about the time that the util_cfgtree.c file was added to CVS.
> I took a look at the archives, and specifically the "Configuration
> modules..." thread. It seems the discussion started with the suggestion
> for config to be made modular, and a roadmap was plotted for doing it.
> Wouldn't-it-be-nice-if scope creep set in, and suddenly the discussion
> turned to making the config XML based. Then the suggestion that Apache
> configs could be made in different languages, and all hell broke
> loose...
> To rewind back from that, what I am trying to propose is extremely
> simple:
> o Apache wants config directives in the form "ApacheDirective [Value]\n"
> or "<ApacheContainer [Value]>\n", one by one in a long list.
> o A simple-config-module hook gets called by the root of the config, and
> by the Include directive that says "hook - give me some config
> statements for this URL/file".
> o The module opens the file / fetches the LDAP object / reads the
> registry, creates lines from this info that look like "ApacheDirective
> [Value]\n" or "<ApacheContainer [Value]>\n"
> o Each of these lines is handed to the core config, which does all the
> magic.
> The above is pretty much how it works now (or it did when I last looked
> at it), only the loop that reads each line from a file is not in a
> module :)
> I'd like to start getting some code together - is it worth me putting
> something like this together? I think that the concerns raised in the
> 2000/04 thread are different to what I am proposing here.

I disagree that the concerns are different.  The web server doesn't need to
know how to contact an LDAP directory.  If you want to store the config in a
different place, do it with a pre-processor.  This also allows us to handle 
graceful restarts better.

What happens in the instance that a module tries to read the config from an 
LDAP server during a restart, if the LDAP server has died?  By the time Apache
knows the LDAP server has died, we have already cleared the pconf pool,
and started killing child processes.  That means we can't just continue to 
use the old config.  We also can't get the new config, so the server stops

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.

Ryan Bloom               
Covalent Technologies

View raw message