Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to set up a reverse proxy to give access to several internal web servers from the internet. I have configured some name based virtual hosts with reverse proxy (I enabled proxy and proxy_http modules).

So far so good...

One of the servers happen to be a wordpress site. Wordpress will generate html pages containing its internal url (for css, etc...). So I am trying to use the proxy_html module to rewrite those urls on the reverse proxy. But I fail miserably.

Most of the documentation on the internet refer to the latest version of the module, but 12.04 ships with version 3.0.1, and I can't figure out how to make it work.

Here is what I have put in my virtual host conffile:

<VirtualHost *:80>
        ProxyPreserveHost On
        ProxyRequests Off
        ProxyPass /
        ProxyPassReverse /
        #SetOuputFilter INFLATE;proxy-html;DEFLATE

I expect any url containing produced by wordpress on server to be translated into This does not happen. I have tried to add other directives, but all failed:

ProxyHTMLEnable On

fails. It seems to be too new and not supported by this version of the module.

SetOuputFilter INFLATE;proxy-html;DEFLATE

fails also. Maybe I am missing a module to do that ? I have tried adding a2enmod filter, but it does not work either...

Well, can someone enlighten me on that ?

EDIT Noticed the mistyping in SetOuputFilter? A t is missing... So SetOutputFilter proxy-html is the way to go to get proxy_html working on 12.04. But I'll rather go for the other solution: tell wordpress to behave according to its public name and generate right urls from the beginning.

share|improve this question
up vote 1 down vote accepted

I have always told Wordpress that my site address was (so that none of the urls created by wordpress have an ip address) and then had my proxy config look something like this:


    ProxyRequests Off
    ProxyPreserveHost On
    ProxyPass /
    ProxyPassReverse /

keeps it simple.

share|improve this answer
Yes, I might finally do that... but then, if I access the site directly from the LAN (without going through the reverse proxy) it fails to load the css... – alci Feb 13 '13 at 16:33
Add a DNS entry to your router (assuming it supports it) mapping the domain name to the servers internal ip address. – Luis Flores III Feb 13 '13 at 16:46
Ok, I buy your first solution. You're right, I'll keep it sipmle. – alci Feb 13 '13 at 17:05
Glad I could help. – Luis Flores III Feb 13 '13 at 17:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.