Sunday, May 29, 2011

apache2 + mod_proxy as reverse proxy on Ubuntu 10.04 LTS (server)

I done this on VMWare workstation. Installing Ubuntu as usual - just select install a minimum virtual system. Afterwards, I use the following command to install apache2 and mod_proxy.

$ sudo apt-get install libapache2-mod-proxy-html

Installation should not be so difficult. The command will install all dependencies (like apache2, other modules, etc.) At this point of time, the installation is completed. Next come to setting the reverse proxy.

$ sudo a2enmod proxy proxy_html

This will enable the proxy and the html proxy protocol handler. Next, is to configure the reverse proxy. You need to edit /etc/apache2/mods-available/proxy.conf, adding the following line before .

ProxyPass /webgoat
At this point, you need to restart the apache2 service by using sudo /etc/init.d/apache2 restart.

I use this as an example to reverse proxy an application called WebGoat running on My apache2 and mod_proxy on So, when I use a browser to point to, it will go through the reverse proxy (on and reach the WebGoat application (on

Next assignment is to install and configure mod_security. This will be my WAF, running in reverse proxy mode to prevent layer 7 attacks.