Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The goal was to change all rendered html downstream from www.breakitdown.ca to www.supernaturalz.com.

Warning

This article needs to be cleaned up and organized and split up to be more focused.

Reverse Proxy Setup

LoadModule proxy_module modules/mod_proxy.so = proxy.load
LoadModule proxy_http_module modules/mod_proxy_http.so = proxy_http.load
LoadModule proxy_html_module modules/mod_proxy_html.so = proxy_html.load

...

Added www.breakitdown.ca to host file at 127.0.0.1 (what is in Confluence admin as ...)

Server Base URL Problem

This at least works in loading up the website, same issue with large images and most likely a host of other problems.

ProxyHTMLURLMap

Ok so ProxyHTMLURLMap does not work easily. The documentation searching in google is sub par and the examples do not seem to work.

Note

I never got ProxyHTMLURLMap working. I have a feeling it's because I never used the Location directive. Anyway will try again at a later date.

Further to that it uses a SAX parser which implies that it expects good xml. I imagine the overhead to be quite high.

substitute

Looking around I found the substitue directive.

sudo a2enmod substitute

Code Block
langhtml
        <Location /wiki/>
                AddOutputFilterByType SUBSTITUTE text/html
                Substitute s/www.breakitdown.ca/www.supernaturalz.com/ni
        </Location>

And that did it!

Have not measured the performance hit yet.

mod_filter

Just noticed that AddOutputFilterByType is deprecated and it is recommended to use mod_filter. So enable it using a2enmod filter.

Refernces

http://www.apachetutor.org/admin/reverseproxies - a bit techie, but the most in depth article I have found on reverse proxy.