I have apache 2.4 setup with mod_proxy to load balance 2 tomcats. Here is the addition to httpd.conf
ProxyRequests Off
ProxyPass /APP balancer://mycluster stickysession=JSESSIONID|jsessionid
ProxyPassReverse /APP balancer://mycluster
<Proxy balancer://mycluster>
BalancerMember http://TOMCAT1:8080/APP route=TOMCAT1
BalancerMember http://TOMCAT2:8080/APP route=TOMCAT2
</Proxy>
<Location /balancer-manager>
SetHandler balancer-manager
Require all granted
</Location>
ProxyPass /balancer-manager !
<Location /server-status>
SetHandler server-status
Require host localhost
Require all granted
</Location>
From a browser if I try "http://localhost:7000/APP" it does not work. However if I use "http://localhost:7000/APP/" the application comes up.
Note the additional "/" and the end of the url. How can this additional / be avoided?
Update Working structure:
ProxyRequests Off
ProxyPass /APP balancer://mycluster/APP stickysession=JSESSIONID|jsessionid
ProxyPassReverse /APP balancer://mycluster/APP
<Proxy balancer://mycluster>
BalancerMember http://TOMCAT1:8080 route=TOMCAT1
BalancerMember http://TOMCAT2:8080 route=TOMCAT2
</Proxy>
<Location /balancer-manager>
SetHandler balancer-manager
Require all granted
</Location>
ProxyPass /balancer-manager !
<Location /server-status>
SetHandler server-status
Require all granted
</Location>