Install Mod Proxy Html Module in Apache

If you have configured Apache reverse proxy on your server, you will also need to install mod_proxy_html. This  module rewrite the HTML links which insures that HTML links work for the users outside the proxy as well. It works same as  Apache’s ProxyPassReverse directive does for HTTP headers, and is a necessary component of a reverse proxy.

To install mod_proxy_html module, make sure that you have installed ‘libxml2-devel’ which is libxml2 development toolkit and ‘httpd-devel’ which is apache2 developer toolkit. The steps below can be run on any linux distribution.

Step1. Download source mod_proxy_html

[root@webserver ~]# wget

Step2. Now extract the source and compile it

[root@webserver ~]# tar -xjvf mod_proxy_html.tar.bz2

[root@webserver mod_proxy_html]# apxs -c -I /usr/include/libxml2 -I. -i mod_proxy_html.c

[root@webserver mod_proxy_html]# chmod 755 /usr/lib/httpd/modules/

[root@webserver mod_proxy_html]# apxs -c -I /usr/include/libxml2 -I. -i mod_xml2enc.c

[root@webserver mod_proxy_html]# chmod 755 /usr/lib/httpd/modules/

[root@webserver mod_proxy_html]# cp proxy_html.conf /etc/httpd/conf.d/

[root@webserver ~]# vim /etc/httpd//conf/httpd.conf

LoadFile   /usr/lib/
LoadModule proxy_html_module modules/
LoadModule xml2enc_module modules/

[root@webserver ~]# service httpd restart

You can leave a response, or trackback from your own site.

One Response to “Install Mod Proxy Html Module in Apache”

  1. Elaina says:

    Your post,Install Mod Proxy Html Module in Apache, is really well written and insightful. Glad I found your website, warm regards!

Leave a Reply