Apache: Setting up a simple reverse proxy

Hello,

this post describes how to setup a reverse proxy for a host. All http requests to host reverseproxy.domain.org should deliver the content of www.domain.org at Port 8080.

First you have to enable the requiered modules in httpd.conf


LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

Then insert a virtual host directive:


<VirtualHost *>
    ServerName reverseproxy.domain.org
    ProxyRequests off
    ProxyPreserveHost On
    ProxyPass / http://www.domain.org:8080/
    ProxyPassReverse / http://www.domain.org:8080/
</VirtualHost>

That’s it.

Michael

Advertisment to support michlstechblog.info

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.