mod_annot editor

Annotate Section

Building Apache for Proxying

With the exception of mod_proxy_html, the above are all included in the core Apache distribution. They can easily be enabled in the Apache build process. For example:

$ ./configure --enable-so --enable-mods-shared="proxy \
proxy_http proxy_ftp proxy_connect headers"
$ make
# make install

Of course, you may want other build options too, and you could just as well build the modules as static.

If you are adding proxying to an existing installation, you should use apxs instead:

# apxs -c -i [module-name].c
noting that mod_proxy itself is in two source files
(mod_proxy.c and proxy_util.c).

This leaves mod_proxy_html, which is not included in the core distribution. mod_proxy_html is a third-party module, and requires a third-party library libxml2. At the time of writing, libxml2 is installed as standard or packaged for most operating systems. If you don't have it, you can download it from and install it yourself. For the purposes of this article, we'll assume libxml2 is installed as /usr/lib/, with headers in /usr/include/libxml2/libxml/.

  1. Check libxml2 is installed. If you have a version older than 2.5.10, then upgrade - there's a bug in earlier versions that can, in some particular cases, severely affect performance.
  2. Download mod_proxy_html.c from
  3. Build mod_proxy_html with apxs:

# apxs -c -I/usr/include/libxml2 -i mod_proxy_html.c