Home > Apache, Linux > Reverse Proxy Apache 2

Reverse Proxy Apache 2

October 13th, 2006 Leave a comment Go to comments

There is a good amount of information on setting up a reverse proxy with apache. One of the better articles I came across was on Apache Week. The downfall to these articles is that most reference ProxyHTMLURLMap, part of the mod_proxy_html module, which is not included in the httpd rpm with Fedora Core.

No problem lets go through the steps of compiling this module. Apache includes apxs, a tool which builds and installs modules. On Fedora this tool is in the httpd-devel rpm. We also need to install the libxml2 development kit as its required by mod_proxy_html. Lets get started.

wget "http://apache.webthing.com/mod_proxy_html/mod_proxy_html.c"
yum install httpd-devel libxml2 libxml2-devel
apxs -c -a -I /usr/include/libxml2 -i mod_proxy_html.c

After apxs completes it will automatically copy the module and add the required lines to the httpd.conf file. However if you try and restart apache it will fail. You need tell apache to load the libxml2 library. Modify the /etc/httpd/conf/httpd.conf adding in the LoadFile. Note the lib64 path is for a 64bit machine, if yours is 32bit it will just be lib.

LoadFile /usr/lib64/libxml2.so
LoadModule proxy_html_module  /usr/lib64/httpd/modules/mod_proxy_html.so

That’s it go ahead and restart apache.

service httpd restart
Categories: Apache, Linux Tags:
  1. No comments yet.
  1. No trackbacks yet.