httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] Using environment variable in httpd.conf
Date Thu, 19 Jan 2006 14:20:06 GMT
On 1/19/06, <> wrote:
> Well Tom, I'm using apache 2.0.50 under SuSE 9.2 pro and
> just added the following to httpd.conf, after my LoadModule statements:
> SetEnv ErrLogPath /var/log/apache2/error_log
> ErrorLog ${ErrLogPath}
> LogLevel debug
> All this does for my setup is create an error_log file under
> /srv/www/ called ${ErrLogPath}.
> Am I missing something?

The undocumented env-variable-in-config-file feature looks at
variables in the server environment at time of startup.  SetEnv
doesn't actually make real environment variables until a cgi script is
launched.  See:

What you want sounds more like the features provided by mod_macro. 

But the standard advice in cases like this is: httpd.conf is not a
programming language, it is a config file.  If you need more advanced
features, then use your favorite preprocess (m4, etc) to generate your
config files.


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