Thursday, February 14, 2013

Update to Apache proxy forwarding

Further notes for allowing proxy forwarding for virtual hosts using different IP aliases tied to the same address.

Install the following package on Ubuntu:
sudo apt-get install libapache2-mod-proxy-html
 In the /etc/apache2/mods-enabled, add the following symbolic links:
$ sudo ln -s ../mods-available/proxy.conf proxy.conf
$ sudo ln -s ../mods-available/proxy_http.load proxy_http.load
$ sudo ln -s ../mods-available/proxy.load proxy.load
In the /etc/apache2/mods-available, edit the mod_proxy:
  • Uncomment the <Proxy *>  and the </Proxy> tags and add "Allow from all" within the tags
 For situations where you need to proxy into an alternate port (e.g. 8080 for web), set up the /etc/apache2/sites-available/default file to handle it:
 <VirtualHost *:80>
            Servername guest.company.com
            ProxyPass / http://quest.company.com:8080/
            ProxyPassReverse / http://guest.company.com:8080/
 </VirtualHost>