Joel Richard <[email protected]> writes: > I thought I'd weigh in on two items of note.... > > On Oct 13, 2009, at 12:17 PM, Scott Gifford wrote: > >> When I have done this in the past, I have done it with generating >> configuration files, so of course one misplaced newline or >> angle-bracket will kill the server. Maybe generating the >> configuration directly from a <Perl> section is more robust? Maybe >> there are ways to catch configuration errors in that layer and handle >> them cleanly without preventing Apache from starting? Any suggestions >> in this area would be appreciated. >> > > > It seems to me that you are assuming that your script must apply the > new configuration to the live apache server. > > Why not have your script simply apply a potential new configuration to > a "test" apache installation (separate from all others), have it > restart apache there, hit a few critical URLs to test functionality > and then report to you if there's an error. If it's successful, it can > then apply that config to the live cluster, keeping fingers crossed, > of course. (and making sure your monitoring software is going to pull > the fire alarm if the cluster goes down.)
That's a good idea, though a bit involved to implement. > If there's an error, you have some time to gracefully solve it and Yeah, good point, thanks. [...] >> Thanks! That looks very close to what I want. I wonder if there is a >> way to do a database lookup and substitute that?... >> > > In my experience, you really want to minimize the hits on your > database and placing a lookup of any kind for -every- connection to > apache would be murderous regardless of which database you're using. Right, absolutely the result would have to be cached. Then I think it would be no problem. ----Scott.
