On Thu, Aug 7, 2008 at 11:22 AM, Berg, Eric <[EMAIL PROTECTED]> wrote: > I need to > build a configuration that will configure each instance based on a > single parameter. Right now I'm using a file called ENVIRONMENT that > gets written during the deploy, so I have a value for DEV, STAGE and > PROD. > > I need to set the following: > > - DocumentRoot > - Listen > - ServerRoot > - HostName > - @INC manipulation to point to our dev, stage and prod lib dirs > - a number of environment variables > > What I'm looking to you good people for is some ideas about best > practices for doing this kind of configuration.
I recommend just using a template and writing out your config files. It's much simpler than trying to wedge dynamic stuff into apache configuration and it works for proxy servers that don't run mod_perl. > - Apache2's configuration is, by default, broken up into a number of > Includes for files in the extras directory, so, what's the "right' way > to break out your configs into these files? There's no reason to follow that example if it doesn't appeal to you. Just use one file if that's how you're used to doing it. - Perrin