Weirdness with Plone and Apache 2.2

While migrating one Plone 3 site to another server I got some unexpected configuration issues.

I have just migrated the site to another server. It has a Plone 3.3.5 site with PloneHelpCenter and a Planet Aggregator for blogs. There’s a Varnish instance in the middle. Moving this site was very strightforward except for a unexpected Apache configuration directive for mod_proxy.

Normally we used this mod_rewrite directives to make the magic happen:

RewriteEngine On
RewriteRule ^/(.*)/${HTTP_HOST}:80/PythonMexico/VirtualHostRoot/$1 [L,P]

RewriteRule ^/(.*){HTTP_HOST}:80/PythonMexico/VirtualHostRoot/$1 [L,P]

But that wasn’t enough for Apache 2.2 and the Proxy redirection was not being made resulting in a error like this:

[Mon Oct 11 23:24:08 2010] [error] [client] client denied by server configuration: proxy:

After some testing I realized that I had to explicity allow the reverse proxy to varnish:

<IfModule mod_proxy.c>
  <Proxy proxy:>
    Order deny,allow
    Allow from localhost

So, that’s it !