Thursday, January 17, 2013

Reverse proxy on Debian

Solution: Reverse proxy.

What I did:

1. Download Debian 6.0.6 (64bit)
2. Install smallest possible version
3. apt-get install apache2
4. a2enmod proxy_http
5. a2enmod headers
6. a2enmod rewrite
7. nano /etc/apache2/sites-available/default

 ServerName server1.wouterspaans.nl
 ProxyPass / http://IIS01.wouterspaans.local/
 ProxyPassReverse / http://IIS01.wouterspaans.local/



 ServerName server2.wouterspaans.nl
 ProxyPass / http://IIS02.wouterspaans.local/
 ProxyPassReverse / http://IIS02.wouterspaans.local/

8. /etc/init.d/apache restart

Done!

Debugging when something goes wroong can be done looking at the logs...
tail -f /var/log/apache2/error.log

No comments: