You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ben Spencer <be...@moody.edu> on 2008/08/30 04:38:23 UTC
[users@httpd] configuration file management
Probing to see if people have a good way/tools which people use to manage
their apache configuration file(s). we have roughly 50 virtual hosts which
are divided into roughly four major applications with each application
having some common configuration directives. While copy/paste works, it is
easy to get lost in the text files (which virtual host am I in). does anyone
have a useful utility (I know about webmin) or a way to arrange the files
and/or "tricks" other things which greatly ease the management of the files
& virtual hosts -- especially when some directives are common between
virtual hosts.
Thank You
Benji Spencer
System Administrator
Moody Bible Institute
Phone: 312-329-2288
Fax: 312-329-8961
RE: [users@httpd] configuration file management
Posted by Ben Spencer <be...@moody.edu>.
Thank you for the information and links.
> You should put common directives into a separate file and Include[1]
> them,
> to avoid repetition.
Does this work within a virtualhost block?
Example:
<VirtualHost *:80>
ServerName: blah.com
# include standard RewriteRules
Include conf/local/common-rewrite.conf
# site specific rules
RewriteRule .+ http://www.yahoo.com [L]
</VirtualHost>
mod_macro also seems to hold promise.
Thanks
Benji
RE: [users@httpd] configuration file management
Posted by "Berg, Eric" <er...@lehman.com>.
Based on some suggestions from the list for a way to manage 3 similar configurations for our dev, stage and production clusters, I moved our deployment system to a templated solution and am very happy with it. I intend to expand it to use a config file to hold defaults and environment-specific values.
For us it was pretty easy once I got my head around the abstraction we were talking about, because we already had an automated deployment system based on our tagging our code to DEV, STAGE, or PROD. Effectively I just had to replace a line that copied file a to location b with one that rendered a to b. Simple.
You could definitely do that with your vhosts. Set up your base types, and then for those things that are different create data that points to a type and has it's vhost-specific info. Read those in and write/render the files.
Then you can hack that into your current deployment system, or wrap a makefile around it or something like that to facilitate creating the files you need.
Hope this helps.
Eric
> -----Original Message-----
> From: Igor Galić [mailto:i.galic@brainsware.org]
> Sent: Saturday, August 30, 2008 10:27 AM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] configuration file management
>
>
> > Probing to see if people have a good way/tools which people
> use to manage
> > their apache configuration file(s). we have roughly 50
> virtual hosts which
> > are divided into roughly four major applications with each
> application
> > having some common configuration directives. While
> copy/paste works, it is
> > easy to get lost in the text files (which virtual host am I
> in). does anyone
>
> You should put common directives into a separate file and
> Include[1] them,
> to avoid repetition.
>
> > have a useful utility (I know about webmin) or a way to
> arrange the files
> > and/or "tricks" other things which greatly ease the
> management of the files
> > & virtual hosts -- especially when some directives are
> common between
> > virtual hosts.
>
> Also you should set sane defaults in the Server Context[2].
>
> Aside from those general advices, there's also things such as
> mod_vhost_alias[3][4] and mod_macro[5].
>
> > Thank You
>
> So long,
>
> Igor
>
> 1. http://httpd.apache.org/docs/2.2/mod/core.html#include
> 2. http://httpd.apache.org/docs/2.2/mod/directive-dict.html#Context
> 3. http://httpd.apache.org/docs/2.2/mod/mod_vhost_alias.html
> 4. http://wiki.apache.org/httpd/VirtualHostAlias
> 5. http://www.cri.ensmp.fr/~coelho/mod_macro/
>
> ---------------------------------------------------------------------
> 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
>
>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.
--------
IRS Circular 230 Disclosure:
Please be advised that any discussion of U.S. tax matters contained within this communication (including any attachments) is not intended or written to be used and cannot be used for the purpose of (i) avoiding U.S. tax related penalties or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein.
---------------------------------------------------------------------
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] configuration file management
Posted by Igor Galić <i....@brainsware.org>.
> Probing to see if people have a good way/tools which people use to manage
> their apache configuration file(s). we have roughly 50 virtual hosts which
> are divided into roughly four major applications with each application
> having some common configuration directives. While copy/paste works, it is
> easy to get lost in the text files (which virtual host am I in). does anyone
You should put common directives into a separate file and Include[1] them,
to avoid repetition.
> have a useful utility (I know about webmin) or a way to arrange the files
> and/or "tricks" other things which greatly ease the management of the files
> & virtual hosts -- especially when some directives are common between
> virtual hosts.
Also you should set sane defaults in the Server Context[2].
Aside from those general advices, there's also things such as
mod_vhost_alias[3][4] and mod_macro[5].
> Thank You
So long,
Igor
1. http://httpd.apache.org/docs/2.2/mod/core.html#include
2. http://httpd.apache.org/docs/2.2/mod/directive-dict.html#Context
3. http://httpd.apache.org/docs/2.2/mod/mod_vhost_alias.html
4. http://wiki.apache.org/httpd/VirtualHostAlias
5. http://www.cri.ensmp.fr/~coelho/mod_macro/
---------------------------------------------------------------------
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