Example Apache 2 reverse proxy configuration for multiple web applications
Here’s an example proxy.conf file for Apache2 used to set up a reverse proxy to multiple web applications written using the SEAM framework. We’re using mod_proxy_balancer with the intention of being able to add additional servers to each cluster in the future.
# disable proxy requests - if enabled, becomes an open proxy-- very bad
ProxyRequests off
# webapp1
<proxy balancer://webapp1>
BalancerMember https://webserver.com/webapp1/ route=node1 keepalive=On
</proxy>
ProxyPass /webapp1 balancer://webapp1 stickysession=JSESSIONID
ProxyPassReverse /webapp1 https://webserver.com/webapp1
# webapp2
<proxy balancer://webapp2>
BalancerMember https://webserver.com/webapp2 route=node1 keepalive=On
</proxy>
ProxyPass /webapp2 balancer://webapp2 stickysession=JSESSIONID
ProxyPassReverse /webapp2 https://webserver.com/webapp2