You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Tim Funk <fu...@apache.org> on 2009/08/26 14:33:47 UTC

[users@httpd] Setting proxy parameters via mod_rewrite

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


Re: [users@httpd] Setting proxy parameters via mod_rewrite

Posted by Tom Evans <te...@googlemail.com>.
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 <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