Re: Environment variables missing from httpd 2.2 installation

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

 



On 9/25/07, Scott Courtney <scourtney@xxxxxxxxxxxxxx> 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@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