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] Environment variables missing from httpd 2.2 installation
Date Thu, 27 Sep 2007 18:20:23 GMT
On 9/25/07, Scott Courtney <scourtney@sinenomine.net> wrote:

>         <Proxy balancer://etr_cluster>
>                 # This sets a cookie telling which server should have affinity for this
client.
>                 # Requires mod_headers to be loaded.
>                 # Header always add Set-Cookie "MYAPP=MYAPP.%{BALANCER_WORKER_ROUTE}e;
path=/;" env=BALANCER_ROUTE_CHANGED
>                 Header always add Set-Cookie "MYAPP=MYAPP.%{BALANCER_WORKER_ROUTE}e;
path=/;"
>                 Header always add X-Myapp-Balancer "%{BALANCER_WORKER_NAME}e;"
>                 Header always add X-Server-Addr "%{SERVER_ADDR}e"
>                 BalancerMember http://192.168.201.121:28080 smax=5 max=20 loadfactor=10
route=etr01
>                 BalancerMember http://192.168.201.121:38080 smax=5 max=20 loadfactor=10
route=etr02
>                 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
reasons.

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

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.

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