Re: [users@httpd] Using environment variable in httpd.conf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/19/06, httpd2@xxxxxxxxxxxx <httpd2@xxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux