Monday, 9 March 2009

Adding proxying to an Ubuntu Apache server

You can enable forward proxying server behaviour in Ubuntu 8.* by doing the following:
- Enable the proxy modules:
sudo a2enmod proxy
- Edit the proxy config file:
sudo vi /etc/apache2/mods-enabled/proxy.conf
- Add your allowed hosts to the section, setting ProxyRequests On and the add a new section:
<directory proxy:*>
Order deny,allow
Deny from all
Allow from my_hosts
</directory>


Restart Apache and you're done:
sudo /etc/init.d/apache2 restart