apache2 reverseproxy for single virtualhost


need to reverseproxy a webite with apache?
following config for following scenario:

your webserver A is running on ip with bla.com
but you want that webserver B running bla.com proxying to webserver A

then put the following config in your configuration file of webserver B:

<VirtualHost *:80>
         <Proxy *>
                Order deny,allow
                Allow from all
         ServerName bla.com
         ServerAlias www.bla.com
         ServerAdmin webmaster@bla.com
         ProxyPreserveHost On
         ProxyPass /
         ProxyPassReverse /

If you are wondering what the option “ProxyPreserveHost” is read here:
http://httpd.apache. … ml#proxypreservehost
don’t forget to change dns settings.

Have fun!