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 http://192.168.222.131/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 192.168.222.131. My apache2 and mod_proxy on 192.168.222.130. So, when I use a browser to point to http://192.168.222.130/webgoat/attack, it will go through the reverse proxy (on 192.168.222.130) and reach the WebGoat application (on 192.168.222.131).

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

1 comment:

hajikhatri said...

wow, great, I was wondering how to cure acne naturally. and found your site by google, learned a lot, now i’m a bit clear. I’ve bookmark your site and also add rss. keep us updated. free vpn