Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

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

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

proxy.load already enabled
proxy_http already enabled

sudo apt-get install libapache2-mod-proxy-html # which also enables it

        # Reverse Proxy to app server start.
        ProxyRequests Off

        <Proxy *>
                Order deny,allow
                Allow from all
        </Proxy>

        ProxyPass /wiki/ http://www.breakitdown.ca:8080/wiki/
        ProxyPassReverse /wiki/ http://www.breakitdown.ca:8080/wiki/

        ProxyPassReverseCookieDomain www.supernaturalz.com www.breakitdown.ca
        # Reverse Proxy to app server end.

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

This at least works in loading up the website, same issue with large images, so need to put in some rewriting.

Ok so ProxyHTMLURLMap does not work easily. The documentation searching in google is sub par and the examples do not seem to work. Further to that it uses a SAX parser which implies that it expects good xml. I imagine the overhead to be quite high.

Looking around found what looks to be better,

sudo a2enmod substitute

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

And that did it!

Have not measure the performance hit yet.

Refernces

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

  • No labels