Rick Hurst Web Developer in Bristol, UK

Menu

Apache as Proxy to IIS

Been meaning to get this working for ages – using apache 2.0 on my ubuntu dev server to proxy requests to an IIS server on the local network – to avoid having IIS facing the internet directly and to be able to have a central place to configure virtualhosts. Finally got it working with a bit of help from the helpful people on underscore. First enable mod_proxy, and then set up a virtual host something like the following:-

(note this is just to enable access to dev servers for testing etc. – not a production environment)

<VirtualHost *>
ServerName myvirtualhost.whatever

ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPreserveHost On
ProxyPass / http://myiisserver/
ProxyPassReverse / http://myiisserver/
</VirtualHost>