httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [users@httpd] Commom Apache configurations shared between live and development servers?
Date Fri, 02 Mar 2007 11:59:36 GMT
Hi guys,

I'm wondering if anybody has done something like this before (it  
doesn't seem that out of the ordinary to me)?

Our current set-up is a mess and we're trying to fix it, so I'm  
looking for some best practice or recommended methods to the following:

Essentially we have a "master" publishing server and then a set of  
development servers and a set of edge browsing servers, all of these  
boxes will be upgraded from Apache 1.3 on FreeBSD 4.9 to Apache 2.0 on  
Red Hat RHEL 4.0.

All of our servers use a standard set of shared configurations for  
site configurations. We then use mod_define and host specific  
configuration files  and pass -D `hostname`to httpd on all boxes to  
decide what the machines virtual host domain names and document roots  
should be.

Okay, so say for example on the edge servers we have etc, our developer boxes host  
<devname>-<locale> (e.g. our perl developer Bob has:

I've been re-implementing the configurations using mod_macro rather  
than mod_define like so:

--- ---

<Macro $server_name $sites_root>
<VirtualHost *>
ServerName $server_name
DocumentRoot $sites_root/

Blah Blah Blah....

Use /var/www/vhosts

--- ---

But as you see, I've been specifying the values to be inserted into  
the Macro from the bottom of the virutal site file (I'm just testing  
out mod_macro on a single test box at the moment).

So far I've considered setting environment variables, however it  
occurs to me that these are quite hard to version control and aren't  
"obvious" at a first look. I'm also worried that somebody might change  
the environment variables by mistake (our Apache user is actually used  
by real users for various tasks, I also realise that should change  

So has anybody done something like this in the past? What are the  
recommended options? One other issue I've noticed is that both  
mod_define and mod_macro do not seem to pass variables onto included  
files, e.g. if I take the above virtual host and add:

"Include conf.d/share/shared-handlers.conf"

If the shared-handlers.conf has any reference to the previously set  
macro variables these are not able to be used by that file (they are  
either seen as literally the macro name - i.e. $sites_root or as  
null), is this an Apache limitation?

I appreciate any tips or suggestions!


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message