httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Nokes <>
Subject [users@httpd] Apache Conf: SetEnv: Using a variable in a value setting
Date Tue, 19 Aug 2003 21:32:14 GMT
I scoured the mail lists, usenet and the web, and of course the Apache
documentation, and I cannot find anything relating to the following issue I've
come accross, so I apologize if this question has come up before.

I'm trying to find out a way I can use a substituted value for a SetEnv
setting in a configuration file.

I have a development environment set up with different sandboxes, one for each
developer.  They each have their own Apache instance and port on the same box.
 Trying to keep everyone's configuration uniform has been a challenge, but I
would like to try and have a few ENVs based off of a base path setting.  For
instance, I would like the following ENVs available from within our mod_perl

... so forth

But instead of hard-coding the path in a bunch of SetEnv directives, I was
hoping I could do something like the following:
  SetEnv  ROW_ROOT      /home/jnokes/dev/row
  SetEnv  CONTENT_ROOT  $ROW_ROOT/content
  ... so forth

This doesn't seem to work.  I've also tried using mod_rewrite's syntax
(%{ENV:...} and it still doesn't work.  Currently, I'm workig around this
problem by setting all the desired ENVs in everyone's bash environments by
having them source a file with all of the desired ENV settings in them, and
then propogating them into the Apache processes via PassEnv directives.  This
works fine.  But Ideally I would like to set all of these in the Apache config
file so I can have one location for all configurations.  I need to keep this
configuration as idiot-proof as possible, and by abstracting a base path in a
variable of some-sort, all I'll have to do is change the base path setting and
all other ENVs should be set properly for their relative relationship with the
base path.  This way, it's one line to change for each sandbox, QA, production
environment, etc.

I'm pretty sure there is no way of doing substitution of a SetEnv value, but
I'm not sure and I was hoping someone here could affirm that or better yet,
show a way that it is possible.

I'm running on Apache 1.3.28, RedHat 7.2.

Thanks in advance,
- Jeff

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