Setting up a reverse proxy using Apache in Ubuntu:

1. Install reverse_proxy module

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

2. Install libxml if it is not already installed.

apt-get install libxml2-dev

3. Load the modules in apache2.conf file

LoadModule  proxy_module         /usr/lib/apache2/modules/
LoadModule  proxy_http_module    /usr/lib/apache2/modules/
LoadModule  headers_module       /usr/lib/apache2/modules/
LoadModule  deflate_module       /usr/lib/apache2/modules/
LoadFile    /usr/lib/

4. Say you want to forward all requests starting with /foo to then add the following to your apache2.conf file

ProxyPass /foo/

5. Bounce Apache and you are good to go.