Setting proxy parameters via mod_rewrite

Setting proxy parameters via mod_rewrite

am 26.08.2009 14:33:47 von Tim Funk

Let's say I have the following rule:

ProxyPass /foo balancer://cluster5/foo stickysession=JSESSIONID

I want to use RewriteRule for my proxy directives. So I'd say this:

RewriteRule ^/(foo.*) balancer://cluster5/$1 [P]

But how do I set stickysession=JSESSIONID [as well as any other
parameters that ProxyPass allows] - or is this a feature request?

Is it just as easy as use E=
RewriteRule ^/(foo.*) balancer://cluster5/$1 [E=stickysession:JSESSIONID]



-Tim

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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

Re: Setting proxy parameters via mod_rewrite

am 26.08.2009 15:40:32 von Tom Evans

On Wed, 2009-08-26 at 08:33 -0400, Tim Funk wrote:
> Let's say I have the following rule:
>
> ProxyPass /foo balancer://cluster5/foo stickysession=JSESSIONID
>
> I want to use RewriteRule for my proxy directives. So I'd say this:
>
> RewriteRule ^/(foo.*) balancer://cluster5/$1 [P]
>
> But how do I set stickysession=JSESSIONID [as well as any other
> parameters that ProxyPass allows] - or is this a feature request?
>
> Is it just as easy as use E=
> RewriteRule ^/(foo.*) balancer://cluster5/$1 [E=stickysession:JSESSIONID]
>
>
>
> -Tim
>

Use ProxySet instead. I assume your session is sticky for the entire
cluster?

RewriteRule ^/(foo.*) balancer://cluster5/$1
ProxySet balancer://cluster5 stickysession=JSESSIONID

See http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxyset

Cheers

Tom


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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