httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Krause>
Subject [users@httpd] ContentNegotiation and ProxyBalancer
Date Tue, 28 Aug 2007 17:53:41 GMT

I'm using Apache 2.2 with mod_proxy_balancer right
now to run a dynamic RESTful application. This app
caches requests in the Apache DocumentRoot, so a
request can be handled by Apache, once generated.

Right now I'm checking my requests via mod_proxy.
If the file does not exist in the DocumentRoot, it will
get forwarded to the ProxyBalancer:

RewriteRule ^/(.*)$ balancer://some_proxy%{REQUEST_URI} [P,QSA,L]

This works fine. But this won't handle content
negotiations. I'm caching the files in the recommended
format "name.lang.format". So my cached files might
be "index.en.html" or "".

The MultiView Option allows content negotiation, but
it obviously won't change the REQUEST_FILENAME,
so my rewrite rule will always be true, whenever someone
requests "index.html", but my cache just has a "index.en.html".
I'm not even sure content negotiation will take place,
if i have a RewriteRule.

If i remove the RewriteRule, content negotiation works
as expected.

But I need the RewriteRule to handle all requests,
that has not been cached yet. It would be great to
use the balancer as a ErrorDocument handler, but
unfortunately, that doesn't work.

Is there a way to solve this problem, by either:
- only rewrite, if the document cannot be found
in the DocumentRoot (including content
- use a balancer as a error-handler, if no file could
be found after content negotiation.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message