64292bd95fd5d70d1d718843b4da455015a0139eniq# Configuration example.
64292bd95fd5d70d1d718843b4da455015a0139eniq#
f1b550a2c882bd0e9da9357d7a5f5c978c63d417rjung# For detailed information about these directives see
f1b550a2c882bd0e9da9357d7a5f5c978c63d417rjung# <URL:http://httpd.apache.org/docs/trunk/mod/mod_proxy_html.html>
f1b550a2c882bd0e9da9357d7a5f5c978c63d417rjung# and for mod_xml2enc see
f1b550a2c882bd0e9da9357d7a5f5c978c63d417rjung# <URL:http://httpd.apache.org/docs/trunk/mod/mod_xml2enc.html>
f1b550a2c882bd0e9da9357d7a5f5c978c63d417rjung#
64292bd95fd5d70d1d718843b4da455015a0139eniq# First, to load the module with its prerequisites. Note: mod_xml2enc
64292bd95fd5d70d1d718843b4da455015a0139eniq# is not always necessary, but without it mod_proxy_html is likely to
64292bd95fd5d70d1d718843b4da455015a0139eniq# mangle pages in encodings other than ASCII or Unicode (utf-8).
64292bd95fd5d70d1d718843b4da455015a0139eniq#
64292bd95fd5d70d1d718843b4da455015a0139eniq# For Unix-family systems:
64292bd95fd5d70d1d718843b4da455015a0139eniq# LoadFile /usr/lib/libxml2.so
64292bd95fd5d70d1d718843b4da455015a0139eniq# LoadModule proxy_html_module modules/mod_proxy_html.so
64292bd95fd5d70d1d718843b4da455015a0139eniq# LoadModule xml2enc_module modules/mod_xml2enc.so
64292bd95fd5d70d1d718843b4da455015a0139eniq#
64292bd95fd5d70d1d718843b4da455015a0139eniq# For Windows (I don't know if there's a standard path for the libraries)
64292bd95fd5d70d1d718843b4da455015a0139eniq# LoadFile C:/path/zlib.dll
64292bd95fd5d70d1d718843b4da455015a0139eniq# LoadFile C:/path/iconv.dll
64292bd95fd5d70d1d718843b4da455015a0139eniq# LoadFile C:/path/libxml2.dll
64292bd95fd5d70d1d718843b4da455015a0139eniq# LoadModule proxy_html_module modules/mod_proxy_html.so
64292bd95fd5d70d1d718843b4da455015a0139eniq# LoadModule xml2enc_module modules/mod_xml2enc.so
64292bd95fd5d70d1d718843b4da455015a0139eniq#
64292bd95fd5d70d1d718843b4da455015a0139eniq# All knowledge of HTML links has been removed from the mod_proxy_html
64292bd95fd5d70d1d718843b4da455015a0139eniq# code itself, and is instead read from httpd.conf (or included file)
64292bd95fd5d70d1d718843b4da455015a0139eniq# at server startup. So you MUST declare it. This will normally be
64292bd95fd5d70d1d718843b4da455015a0139eniq# at top level, but can also be used in a <Location>.
64292bd95fd5d70d1d718843b4da455015a0139eniq#
64292bd95fd5d70d1d718843b4da455015a0139eniq# Here's the declaration for W3C HTML 4.01 and XHTML 1.0
64292bd95fd5d70d1d718843b4da455015a0139eniq
64292bd95fd5d70d1d718843b4da455015a0139eniqProxyHTMLLinks a href
64292bd95fd5d70d1d718843b4da455015a0139eniqProxyHTMLLinks area href
64292bd95fd5d70d1d718843b4da455015a0139eniqProxyHTMLLinks link href
64292bd95fd5d70d1d718843b4da455015a0139eniqProxyHTMLLinks img src longdesc usemap
64292bd95fd5d70d1d718843b4da455015a0139eniqProxyHTMLLinks object classid codebase data usemap
64292bd95fd5d70d1d718843b4da455015a0139eniqProxyHTMLLinks q cite
64292bd95fd5d70d1d718843b4da455015a0139eniqProxyHTMLLinks blockquote cite
64292bd95fd5d70d1d718843b4da455015a0139eniqProxyHTMLLinks ins cite
64292bd95fd5d70d1d718843b4da455015a0139eniqProxyHTMLLinks del cite
64292bd95fd5d70d1d718843b4da455015a0139eniqProxyHTMLLinks form action
64292bd95fd5d70d1d718843b4da455015a0139eniqProxyHTMLLinks input src usemap
64292bd95fd5d70d1d718843b4da455015a0139eniqProxyHTMLLinks head profile
64292bd95fd5d70d1d718843b4da455015a0139eniqProxyHTMLLinks base href
64292bd95fd5d70d1d718843b4da455015a0139eniqProxyHTMLLinks script src for
64292bd95fd5d70d1d718843b4da455015a0139eniq
64292bd95fd5d70d1d718843b4da455015a0139eniq# To support scripting events (with ProxyHTMLExtended On),
64292bd95fd5d70d1d718843b4da455015a0139eniq# you'll need to declare them too.
64292bd95fd5d70d1d718843b4da455015a0139eniq
64292bd95fd5d70d1d718843b4da455015a0139eniqProxyHTMLEvents onclick ondblclick onmousedown onmouseup \
64292bd95fd5d70d1d718843b4da455015a0139eniq onmouseover onmousemove onmouseout onkeypress \
64292bd95fd5d70d1d718843b4da455015a0139eniq onkeydown onkeyup onfocus onblur onload \
64292bd95fd5d70d1d718843b4da455015a0139eniq onunload onsubmit onreset onselect onchange
64292bd95fd5d70d1d718843b4da455015a0139eniq
64292bd95fd5d70d1d718843b4da455015a0139eniq# If you need to support legacy (pre-1998, aka "transitional") HTML or XHTML,
64292bd95fd5d70d1d718843b4da455015a0139eniq# you'll need to uncomment the following deprecated link attributes.
64292bd95fd5d70d1d718843b4da455015a0139eniq# Note that these are enabled in earlier mod_proxy_html versions
64292bd95fd5d70d1d718843b4da455015a0139eniq#
64292bd95fd5d70d1d718843b4da455015a0139eniq# ProxyHTMLLinks frame src longdesc
64292bd95fd5d70d1d718843b4da455015a0139eniq# ProxyHTMLLinks iframe src longdesc
64292bd95fd5d70d1d718843b4da455015a0139eniq# ProxyHTMLLinks body background
64292bd95fd5d70d1d718843b4da455015a0139eniq# ProxyHTMLLinks applet codebase
64292bd95fd5d70d1d718843b4da455015a0139eniq#
64292bd95fd5d70d1d718843b4da455015a0139eniq# If you're dealing with proprietary HTML variants,
64292bd95fd5d70d1d718843b4da455015a0139eniq# declare your own URL attributes here as required.
64292bd95fd5d70d1d718843b4da455015a0139eniq#
64292bd95fd5d70d1d718843b4da455015a0139eniq# ProxyHTMLLinks myelement myattr otherattr
64292bd95fd5d70d1d718843b4da455015a0139eniq#
64292bd95fd5d70d1d718843b4da455015a0139eniq###########
64292bd95fd5d70d1d718843b4da455015a0139eniq# EXAMPLE #
64292bd95fd5d70d1d718843b4da455015a0139eniq###########
64292bd95fd5d70d1d718843b4da455015a0139eniq#
64292bd95fd5d70d1d718843b4da455015a0139eniq# To define the URL /my-gateway/ as a gateway to an appserver with address
64292bd95fd5d70d1d718843b4da455015a0139eniq# http://some.app.intranet/ on a private network, after loading the
64292bd95fd5d70d1d718843b4da455015a0139eniq# modules and including this configuration file:
64292bd95fd5d70d1d718843b4da455015a0139eniq#
64292bd95fd5d70d1d718843b4da455015a0139eniq# ProxyRequests Off <-- this is an important security setting
64292bd95fd5d70d1d718843b4da455015a0139eniq# ProxyPass /my-gateway/ http://some.app.intranet/
64292bd95fd5d70d1d718843b4da455015a0139eniq# <Location /my-gateway/>
64292bd95fd5d70d1d718843b4da455015a0139eniq# ProxyPassReverse /
64292bd95fd5d70d1d718843b4da455015a0139eniq# ProxyHTMLEnable On
64292bd95fd5d70d1d718843b4da455015a0139eniq# ProxyHTMLURLMap http://some.app.intranet/ /my-gateway/
64292bd95fd5d70d1d718843b4da455015a0139eniq# ProxyHTMLURLMap / /my-gateway/
64292bd95fd5d70d1d718843b4da455015a0139eniq# </Location>
64292bd95fd5d70d1d718843b4da455015a0139eniq#
64292bd95fd5d70d1d718843b4da455015a0139eniq# Many (though not all) real-life setups are more complex.
64292bd95fd5d70d1d718843b4da455015a0139eniq#
64292bd95fd5d70d1d718843b4da455015a0139eniq# See the documentation at
64292bd95fd5d70d1d718843b4da455015a0139eniq# http://apache.webthing.com/mod_proxy_html/
64292bd95fd5d70d1d718843b4da455015a0139eniq# and the tutorial at
64292bd95fd5d70d1d718843b4da455015a0139eniq# http://www.apachetutor.org/admin/reverseproxies