Table of Contents
mod_proxy, proxy_html
prerequisites
- install mod-proxy-html. In Ubuntu this is done by
apt-get install libapache2-mod-proxy-html
- activate all needed modules: proxy, proxy_http, proxy_html, headers. In Ubuntu this is done by
a2enmod proxy a2enmod proxy_http a2enmod proxy_html a2enmod headers
How is it done?
Its magic. Pure magic. Every trailing and leading / is of the uttermost importance and never forget the RequestHeader unset Accept-Encoding cause it will allow you to view webpages that have a gzip-encoding and for some stupid reason also made my stylesheets work.
There are sourceres on the web which may lead you to create your own reverseproxymagic, but it seems that you have to do a lot of try and error on your own.
my sources:
- http://www.wlug.org.nz/ApacheReverseProxy - But imho the ProxyReversePass is wrong and the Request-Header is missing
- http://www.yacy-websuche.de/wiki/index.php/De:ReverseProxy#mod_proxy_konfigurieren - the output-filter is in a different location and the ProxyHTMLExtended is used, which is explained a bit in http://www.apachetutor.org/admin/reverseproxies
working example
The following example works. Its fieldtested.
ProxyPass /goldfisch http://www.goldfisch.at/
ProxyHTMLURLMap http://www.goldfisch.at /goldfisch
<Location /goldfisch>
## ProxyPassReverse http://www.goldfisch.at/
ProxyPassReverse /
SetOutputFilter proxy-html
ProxyHTMLURLMap / /goldfisch/
ProxyHTMLURLMap /goldfisch /goldfisch
RequestHeader unset Accept-Encoding
</Location>
knowwiki/howtos/mod_proxy.txt · Last modified: 2008/11/11 14:49 by peter



