Re: Re-use of a Setenv directive

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

 



Sébastien, hello. I don't have a solution for you but I'm waiting for a similar reply.

I hope the following helps:

>From my e-mail thread entitled, 'Setting CGI environment variables, dynamically, from httpd.conf leveraging exising variables':
...
2. Technique 2: setenv DAVESETENV "text"
> ----------------------------------------------
>
>     Result: DAVESETENV="text"
>
> But, I've read that this is only a static string.
>
> http://www.usenet-forums.com/apache-web-server/10179-setenv-dynamic-variable.html
Eric Covenor replied:
setenvif is a bit more flexible:
http://httpd.apache.org/docs/current/mod/mod_setenvif.html#setenvif
==> So I reckon you should look at setenvif, rather.

----------

>From my Email entitled, 'RewriteRule .* - [E=TEMP_SMUSER:%{SSL:OID("2.5.29.17")}]  # Subject Alternate Name':

...

Question 2: Also, I've never gotten SetEnvIf to work, for example:
SetEnvIf "LA-U:REMOTE_PORT"               "(.*)"            A_SETENVIF_LA_U_REMOTE_PORT=$1
SetEnvIf ${LA-U:REMOTE_PORT}               "(.*)"            A_SETENVIF_LA_U_REMOTE_PORT_PERCENT=$1

SetEnvIf "LA-F:REMOTE_PORT"               "(.*)"            A_SETENVIF_LA_F_REMOTE_PORT=$1
SetEnvIf ${LA-F:REMOTE_PORT}               "(.*)"            A_SETENVIF_LA_F_REMOTE_PORT_PERCENT=$1

SetEnvIf "ENV:REMOTE_PORT"               "(.*)"            A_SETENVIF_ENV_REMOTE_PORT=$1
SetEnvIf ${ENV:REMOTE_PORT}               "(.*)"            A_SETENVIF_ENV_REMOTE_PORT_PERCENT=$1

SetEnvIf "SSL:REMOTE_PORT"               "(.*)"            A_SETENVIF_SSL_REMOTE_PORT=$1
SetEnvIf ${SSL:REMOTE_PORT}               "(.*)"            A_SETENVIF_SSL_REMOTE_PORT_PERCENT=$1

SetenvIf %{OID("0.9.2342.19200300.100.1.1")} "(.*)"            A_SETENVIF_OIDTEST_WITH_PERCENT=3D$1
SetenvIf OID("0.9.2342.19200300.100.1.1") "(.*)"            A_SETENVIF_OIDTEST=3D$1
Result:
A_SETENVIF_ENV_REMOTE_PORT=""
A_SETENVIF_ENV_REMOTE_PORT_PERCENT=""
A_SETENVIF_LA_F_REMOTE_PORT=""
A_SETENVIF_LA_F_REMOTE_PORT_PERCENT=""
A_SETENVIF_LA_U_REMOTE_PORT=""
A_SETENVIF_LA_U_REMOTE_PORT_PERCENT=""
A_SETENVIF_OIDTEST="3D"
A_SETENVIF_OIDTEST_WITH_PERCENT="3D"
A_SETENVIF_SSL_REMOTE_PORT=""
  

If I receive an answer I'll let you know.

Cdlt, Dave
-----
Sébastien Moretti wrote:
Hi

I have defined a SetEnv Directive this way:
    SetEnv BASE_PATH /tmp/smthg

I would like to re-use this variable in another SetEnv Directive, e.g.:
    SetEnv PATHS $BASE_PATH/a:$BASE_PATH/b:$BASE_PATH/c:...


But $BASE_PATH is not interpreted as a variable.
I tried with quotes, back-splash, ...


How can I re-use this variable in another SetEnv Directive ?
Thanks




Apache 2.2.3, Linux kernel 2.6.18, x86_64



[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