httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Wang <>
Subject mod_proxy issues and patch
Date Wed, 28 Feb 2007 22:50:40 GMT
Hi all,
I'm trying to work on getting some sane AJP proxy configurations using 
Apache 2.2.4.

The problem I'm running into is that we use RewriteRules to use regular 
expression matching for proxying.  In a previous thread on this dev list 
there was a discussion around ProxyPass being insufficient for regular 
expression matching and that perhaps it should function more like 
JkMount with mod_jk.

Specifically the problem I'm running into is something like this:

RewriteRule ^(.*\.jsp)$ ajp://localhost:8010$1 [P]

In this scenario, I don't use ProxyPass to declare a mod_proxy_ajp 
worker.  There doesn't appear to be a "DefineWorker" directive behavior 
that someone mused about in the previous thread.  Thus, if I want to 
configure the connection pooling characteristics, I can't do the following

<Proxy ajp://localhost:8010>
   ProxySet max=100 smax=10

Because Apache will complain that the ajp://localhost:8010 worker 
doesn't exist.
I can create a dummy ProxyPass statement:
ProxyPass /bogus ajp://localhost:8010

it seems to work, but that just looks ugly to me :).

It looks like with:
This problem will be solved as the <Proxy> section will create the 
worker if it doesn't already exist.

But that's only in trunk.  The patch looks relatively simple though, so 
any chance of getting it patched back into a stable 2.2.x tree?

The other option that I think will work, but I haven't tested is to use 
a balanced worker:
<Proxy balancer://singleworker>
   BalancerMember ajp://localhost:8010 max=100 smax=10

Then declare the RewriteRule to use balancer://singleworker

Basically, it appears mod_proxy_ajp is a slight step backwards in terms 
of mod_jk's JkMount functionality.   If I'm missing something though, 
feel free to slap me up and correct me.


View raw message