You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Bill Moseley <mo...@hank.org> on 2009/11/06 20:02:55 UTC

Re: Best Practices for managing repetitive Apache config file entries?

On Fri, Nov 6, 2009 at 10:30 AM, Mark Stosberg <ma...@summersault.com> wrote:

>
> I'm working on a mod_perl project where we would like to implement to
> Apache related goals:
>
> 1. Automate repetitive configurations. For developers, we repeat the
> same configs with the only difference being the "~user" location. In
> other cases, the differences are not far from s/alpha/beta.
>
> 2. Put the Apache configurations under source control. Here the goal is
> to tie changes to the Apache configs to other code changes in the
> project.
>

I generate httpd.conf files on the fly (i.e. when I start Apache) from
Template toolkit and YAML files.

The script merges the configurations from multilple YAML files -- i.e. form
a main config.yaml file and then when, say, running on "staginge", from
staging.yml.  Then it merges with a local file which allows individual
developers to override settings in their home directory.  Then the
apache-specific config is passed to a script that builds the httpd.conf
files and starts (or stops) apache.



-- 
Bill Moseley
moseley@hank.org

Re: Best Practices for managing repetitive Apache config file entries?

Posted by Michael Peters <mp...@plusthree.com>.
On 11/06/2009 02:02 PM, Bill Moseley wrote:

> I generate httpd.conf files on the fly (i.e. when I start Apache) from
> Template toolkit and YAML files.

This is very similar to what we do. We have a script to start/stop 
apache which will first generate the real config from the templated 
config. We use HTML::Template and Config::ApacheFormat but the idea is 
the same. And our templated files also live in svn.

-- 
Michael Peters
Plus Three, LP

Re: Best Practices for managing repetitive Apache config file entries?

Posted by Mark Stosberg <ma...@summersault.com>.
On Fri, 6 Nov 2009 11:02:55 -0800
Bill Moseley <mo...@hank.org> wrote:

> On Fri, Nov 6, 2009 at 10:30 AM, Mark Stosberg <ma...@summersault.com> wrote:
> 
> >
> > I'm working on a mod_perl project where we would like to implement to
> > Apache related goals:
> >
> > 1. Automate repetitive configurations. For developers, we repeat the
> > same configs with the only difference being the "~user" location. In
> > other cases, the differences are not far from s/alpha/beta.
> >
> > 2. Put the Apache configurations under source control. Here the goal is
> > to tie changes to the Apache configs to other code changes in the
> > project.
> >
> 
> I generate httpd.conf files on the fly (i.e. when I start Apache) from
> Template toolkit and YAML files.
> 
> The script merges the configurations from multilple YAML files -- i.e. form
> a main config.yaml file and then when, say, running on "staginge", from
> staging.yml.  Then it merges with a local file which allows individual
> developers to override settings in their home directory.  Then the
> apache-specific config is passed to a script that builds the httpd.conf
> files and starts (or stops) apache.

That's another interesting approach to consider. 

I should also mention we use several of the Apache configs under CGI as
part of our development model, so our solution won't be
modperl-specific. (And I appreciate this approach is not
modperl-specific). 

   Mark

-- 
 . . . . . . . . . . . . . . . . . . . . . . . . . . . 
   Mark Stosberg            Principal Developer  
   mark@summersault.com     Summersault, LLC     
   765-939-9301 ext 202     database driven websites
 . . . . . http://www.summersault.com/ . . . . . . . .