Using WPMU with reverse proxies


I run a number of standalone wordpress blogs that have grown up over time on a number of hosts.

It's getting a real pain keeping them all patched and such and I found WPMU and it's looking like my saviour in terms of running them all off a single codebase.. awesome.

However so I don't lose all my search rankings I wrote myself a simple proxy script that I have put on the blogs original hosting that passes requests through to my WPMU server and then back to the browser, so it looks to the rest of the world as though nothing has changed and everything is on its own domain name and own hosting.. excellent again!

The one flaw is that anything that uses POST rather than GET doesn't work, so I can't login to my blogs and people can't post comments (well they can post them, but get only a blank screen after posting, no confirmation).

This is the last piece of the jigsaw for me and if I can get it fixed then it would all be perfect.

Can anyone help point me in a direction that could solve this last issue?


  • channel5
    • New Recruit

    Hi drmike

    I don't see why it's black hat? It's important to keep my blogs physically hosted in the countries they individually target.

    If I move everything onto one server in the eyes of the search engines then all my sites will lose their geographical hosting location vector (they are all generic TLD's).

    Anyway, as I said, I've almost cracked it, it's just POST's that are the issue, and wading through the code it seems to be the redirect sanitisation within wordpress that causes the issue.. I

    Anyone with any pointers would love to hear them,


  • kernel_panic
    • Flash Drive

    What proxy method are you using? You need to be using an actual full fledged reverse proxy (IE Apache + mod_proxy)

    Apache's mod_proxy is a PITA to get running right so it's proxying everything.

    A better solution would be to use a standalone proxy. I use HAProxy for my own load balancing and reverse proxying:

    IE -> goes to HAProxy running on ServerA

    HAProxy then proxies the requests to a pool of servers (your pool will contain just one)

    The servers it proxies the requests to can be private (only accessible within the datacenter) or public (elsewhere on the intenet)

    Have your host set you up with a VPS, and install HAproxy, and point it to the IP/port of your WPMU install.

    Your haproxy.cfg will have a stanza like:

    mode http
    stats enable
    stats auth user:pass
    balance roundrobin
    cookie JSESSIONID prefix
    option httpclose
    option forwardfor
    server wordpress-mu *IP ADDRES OF THE WPMU SERVER*:80 cookie wordpress-mu check

    This works like a charm. I use it myself to load balance our SAAS application written in cakephp, and it uses extjs for it's ajax framework. POST/GET you name it is proxied properly. I also use it on a WPMU install and it works great.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.