You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by jo...@fanti.co.uk on 2007/03/02 12:59:36 UTC
[users@httpd] Commom Apache configurations shared between live and development
servers?
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
www.abcd.com/.de/.fr/.it... etc, our developer boxes host
<devname>-<locale>.abcd.com (e.g. our perl developer Bob has:
bob-main.abcd.com/bob-german.abcd.com/bob-italian.abcd.com).
I've been re-implementing the configurations using mod_macro rather
than mod_define like so:
--- www.abcd.com ---
<Macro www.abcd.com $server_name $sites_root>
<VirtualHost *>
ServerName $server_name
DocumentRoot $sites_root/www.abcd.com/htdocs
Blah Blah Blah....
</VirtualHost>
</Macro>
Use www.abcd.com bob-main.abcd.com /var/www/vhosts
--- www.abcd.com ---
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
eventually).
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!
Jon.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Commom Apache configurations shared between live and development servers?
Posted by Krist van Besien <kr...@gmail.com>.
On 3/2/07, jon@fanti.co.uk <jo...@fanti.co.uk> wrote:
> 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.
>
I had a similar problem to solve. Multiple web servers, development
servers etc. But I solved it using mod_perl. With mod_perl you are
very flexible.
Krist
--
krist.vanbesien@gmail.com
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org