I wanted to do a reverse proxy to wordpress.com in order to integrate an existing wordpress.com blog into an existing site. This turned out to be a little trickier than I’d thought due to wordpress.com’s usage of gzip deflation of their output.

Figured this out thanks to sound advice here and here:

  ...

  <Proxy *>
        Allow from .mysite.com
  </Proxy>
  ProxyPass / myblog.wordpress.com
  ProxyPassReverse / http://myblog.wordpress.com/
  ProxyHTMLURLMap http://myblog.wordpress.com/ /
  <Location />
    SetOutputFilter proxy-html
    # get rid of Content-Encoding at wordpress end
    # To use this you'll need to do (on debian) a2enmod headers
    RequestHeader unset  Accept-Encoding

    # Alternative method: inflate then deflate again ... (requires more effort at our end)
    # Could NOT get this to work (though suggested by both reference sites!)
    # SetOutputFilter INFLATE;proxy-html;DEFLATE
  </Location>

  ....
 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>