Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

mod_ifenv

17 views
Skip to first unread message

Erik Aronesty

unread,
Nov 5, 2009, 8:53:48 AM11/5/09
to
for my configuration file, this sort of construct would be extremely
useful

<IfEnv var=value>
...directives...
</IfEnv>

i've seen many posts about the old module mod_ifenv that was never
ported to apache 2.0

most people who want conditionals have perl programs or other scripts
that generate conf files (i use an smx parsed file on one)

while this works ... it's clumsy and would be unnecessary if this
construct were made available

as a good example, i have 5 servers with identical conf files, with
the exception that one of the servers is the "master" and requires
some additional configuration.

also, for security and clarity, i explicitly list the IP addresses and
ports that the server is listening on.... this requires a separate
include file as well

barring scripted generation, juggling include files seems to be the
only solution for a modular, adaptable apache config file.

does anyone else see the value in a standard <IfEnv> apache config
construct?

HansH

unread,
Nov 5, 2009, 12:41:28 PM11/5/09
to
"Erik Aronesty" <earo...@gmail.com> schreef in bericht
news:70a20fde-5eab-4f7b...@m26g2000yqb.googlegroups.com...

> for my configuration file, this sort of construct would be extremely
> useful
> <IfEnv var=value>
> ...directives...
> </IfEnv>
> i've seen many posts about the old module mod_ifenv that was never
> ported to apache 2.0
>
> as a good example, i have 5 servers with identical conf files, with
> the exception that one of the servers is the "master" and requires
> some additional configuration.
>
> also, for security and clarity, i explicitly list the IP addresses and
> ports that the server is listening on.... this requires a separate
> include file as well
To avoid those includes I'm using the same _names_ in the config of all
machines, while defining different IPs to them by a machine's hosts file.
Using names for ao named vhosts AND hosts files to avoid DNS deadlocks do
work like a charme for me in a loadbalanced setup.

> barring scripted generation, juggling include files seems to be the
> only solution for a modular, adaptable apache config file.

Being used to a split file config 'the Debian way' I've started to dislike
single-file setups defining over a handful of vhosts in the same file.

> does anyone else see the value in a standard <IfEnv> apache config
> construct?

Have you tried IfDefine to soften the pain a bit?
http://httpd.apache.org/docs/2.2/mod/core.html#ifdefine

HansH


0 new messages