Proxying with Apache on Windows

November 25, 2010

I wanted to proxy all local traffic onto a specific WAR file in a local tomcat. This was because a client was having trouble calling my service through Apache, but was working calling it direct.

I installed Apache on Windows, and then uncommented the following modules:

LoadModule  proxy_module         modules/mod_proxy.so
LoadModule  proxy_http_module    modules/mod_proxy_http.so
LoadModule  headers_module       modules/mod_headers.so
LoadModule  deflate_module       modules/mod_deflate.so

Then I used ProxyPass and ProxyPassReverse to redirect the traffic:

ProxyPass / http://localhost:8080/war-file-name/
ProxyPassReverse / http://localhost:8080/war-file-name/

Tags: apache proxy windows