Setup a reverse proxy for Apache with mod_proxy_html 


June 23, 2010 22:24:01    Last update: June 23, 2010 22:24:01
  1. Apache web server
  2. mod_proxy_html

# Load mod_proxy_html required SOs
LoadFile	/usr/local/lib/
LoadModule	proxy_html_module	modules/
LoadModule	xml2enc_module		modules/

# All knowledge of HTML links has been removed from the mod_proxy_html
# code itself, and is instead read from httpd.conf (or included file)
# at server startup.  So you MUST declare it.  This will normally be
# at top level, but can also be used in a <Location>.
# Here's the declaration for W3C HTML 4.01 and XHTML 1.0
ProxyHTMLLinks	a		href
ProxyHTMLLinks	area		href
ProxyHTMLLinks	link		href
ProxyHTMLLinks	img		src longdesc usemap
ProxyHTMLLinks	object		classid codebase data usemap
ProxyHTMLLinks	q		cite
ProxyHTMLLinks	blockquote	cite
ProxyHTMLLinks	ins		cite
ProxyHTMLLinks	del		cite
ProxyHTMLLinks	form		action
ProxyHTMLLinks	input		src usemap
ProxyHTMLLinks	head		profile
ProxyHTMLLinks	base		href
ProxyHTMLLinks	script		src for

# To support scripting events (with ProxyHTMLExtended On),
# you'll need to declare them too.

ProxyHTMLEvents	onclick ondblclick onmousedown onmouseup \
		onmouseover onmousemove onmouseout onkeypress \
		onkeydown onkeyup onfocus onblur onload \
		onunload onsubmit onreset onselect onchange

# Set custom FPI (Formal Public Identifier)
ProxyHTMLDocType "<!DOCTYPE html>"

# Proxy settings
ProxyRequests Off
ProxyPass /myWebApp
ProxyPassReverse /myWebApp
<Location /myWebApp>
	ProxyHTMLEnable On
	ProxyHTMLURLMap /myWebApp/

# load proxy_html conf
Include conf/extra/proxy_html.conf

Share |
| Comment  | Tags