Re: Re-use of a Setenv directive

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

 



Hello Dave,

thanks for your help.

In fact, I just want to define BASE_PATH in order to re-use it in PATHS.
PATHS contains several times BASE_PATH and I would like to change BASE_PATH value once instead of several times in PATHS.

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

--
Sébastien Moretti
Department of Ecology and Evolution,
Biophore, University of Lausanne,
CH-1015 Lausanne, Switzerland
Tel.: +41 (21) 692 4221/4079
http://bioinfo.unil.ch/

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