httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jos...@slive.ca>
Subject Re: [users@httpd] Using environment variable in httpd.conf
Date Thu, 19 Jan 2006 14:20:06 GMT
On 1/19/06, httpd2@karsites.net <httpd2@karsites.net> 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:
http://httpd.apache.org/docs/2.2/env.html

What you want sounds more like the features provided by mod_macro. 
See http://modules.apache.org/.

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.

Joshua.

---------------------------------------------------------------------
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


Mime
View raw message