The Temple of Fu

code, systems and games

Archive for the ‘Apache’ Category

Apache mod_proxy

leave a comment »

So if you want to proxy say an IIS server behind your Apache box, and hey lets be honest who wouldn’t want to, you can do it using mod_proxy and name based virtual hosting. Mod_proxy simply redirects requests for certain URLs to another web server.

Create a vhost definition.

<Virtualhost *>
  ServerName mysubdomain.domain.com
  ProxyPreserveHost On
  ProxyPass / http://192.168.1.1/
  ProxyPassReverse / http://192.168.1.1/
  SetEnv force-proxy-request-1.0 1
  SetEnv proxy-nokeepalive 1
</Virtualhost>

Have Apache re read it’s configuration and whammo!

Now you can have multiple flavors of web servers sitting behind a single IP! Sweet huh.

Resources:

http://httpd.apache.org/docs/2.0/mod/mod_proxy.html

Written by lordfu

February 25, 2010 at 2:36 am

Posted in Apache, Linux, RedHats, Slackware