httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <>
Subject Re: [users@httpd] Environment variables missing from httpd 2.2 installation
Date Thu, 27 Sep 2007 18:20:23 GMT
On 9/25/07, Scott Courtney <> wrote:

>         <Proxy balancer://etr_cluster>
>                 # This sets a cookie telling which server should have affinity for this
>                 # Requires mod_headers to be loaded.
>                 # Header always add Set-Cookie "MYAPP=MYAPP.%{BALANCER_WORKER_ROUTE}e;
>                 Header always add Set-Cookie "MYAPP=MYAPP.%{BALANCER_WORKER_ROUTE}e;
>                 Header always add X-Myapp-Balancer "%{BALANCER_WORKER_NAME}e;"
>                 Header always add X-Server-Addr "%{SERVER_ADDR}e"
>                 BalancerMember smax=5 max=20 loadfactor=10
>                 BalancerMember smax=5 max=20 loadfactor=10
>                 Order deny,allow
>                 Deny from all
>                 Allow from all
>         </Proxy>

> The line "Header always add X-Server-Addr "%{SERVER_ADDR}e"" is just for testing.

That line isn't going to work because SERVER_ADDR is a variable that
is put in the environment only for CGI/SSI pages. Apache doesn't
populate the standard CGI variables in other cases for performance

For the other ones, I can only guess because I don't use the balancer
myself. My guess would be that they don't work because they aren't
available in that context (because they haven't yet been set). Try
instead putting the Header directives in a <Location /> instead of

Also, to see if the variables are there at all, you can try putting
them in your LogFormat and see if they show up in the access log.


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