Tag Archives: Apache

How to use Apache as a proxy server

The following configuration allows you to make Apache forward the request for your domain to a second domain at port 8081. If the user enters “www.domain.com” in his browser he well see the content provided by the server listening at http://www.otherdomain.com:8081/. 

<VirtualHost *:80>
    ServerName www.testdomain.com
    ServerAlias testdomain.com *.testdomain.com
    ProxyRequests Off
    <Proxy *>
        Order deny,allow
        Allow from all
    ProxyPass / http://www.testdomain.com:8081/
    ProxyPassReverse / http://www.testdomain.com:8081/
    <Location />
        Order allow,deny
        Allow from all