Apache-isms, part CCXVIII

I’ve enountered the exact same problem with a number of recent deployments of Rails apps behind Debian servers using Apache 2.2 and mod_proxy_balancer. Basically, if you use the standard recipe of simply setting top-level ProxyPass / balancer://foo (and ProxyPassReverse) directives, only top-level URLs (http://vhost.example.com/) will ever be passed through. Anything else is blocked by Apache, with an error of the following form ending up in the logs:

“No protocol handler was valid for the URL”

This is due to some weirdness in the Debian packages, and apparently just on Etch (a.k.a. Debian 4.0). On other distros/platforms, the standard directives seem to work fine. I suspect there’s a top-level default Deny policy sneaking in from the Debian-bundled Apache config files, but I haven’t manged to find a way to disable it.

In the meantime, adding the following rewrite rule seems to do the trick:

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

0 Responses to “Apache-isms, part CCXVIII”


  1. No Comments

Leave a Reply