1 Reply Latest reply on Feb 12, 2015 7:56 PM by Maxime Bellerose

    ProxyPass statements with specific ports don't seem to work

    Paul B Newbie

      I think what I am trying to do is not possible, but I wanted to check.  I have 2 servers that perform as proxies for separate servers running tomcat.  The tomcat servers are not able to change their context urls, so when more than one tomcat instance is running the contexts will be the same.  What we did before with mod_proxy_balancer is to run other sessions of tomcat on different ports and then forward requests at some new context url to a different internal port, EX:

       

      ProxyPass /342/svc/ balancer://somecluster:8081/svc/

      ProxyPassReverse /342/svc/ balancer://somecluster:8081/svc/

      ProxyPass /351/svc/ balancer://somecluster:8082/svc/

      ProxyPassReverse /351/svc/ balancer://somecluster:8082/svc/

       

      But for some reason these statements have no effect on the mod cluster setup.  When you try to navigate to the url it just gives 404 not found.  I can see the applications registered in the balancer-manager but the /342/svc/ context url doesn't work.  Is this not supposed to work by design?

        • 1. Re: ProxyPass statements with specific ports don't seem to work
          Maxime Bellerose Newbie

          Hello Paul,

           

          The port should be applied to the balencer member, not the balancer group.

           

          Please see the following, exemple:

           

                  <Proxy balancer://groupofajpserver>

                         BalancerMember ajp://server1:8009 route=server1 disablereuse=on ttl=600 max=50

                         ProxySet stickysession=ROUTEID

                  </Proxy>

           

                  <Proxy balancer://groupofhttpserver>

                         BalancerMember http://server1:8081 route=server1 disablereuse=on ttl=600 max=50

                         ProxySet stickysession=ROUTEID

                  </Proxy>

           

                  #If doing it in AJP -- Make sur you enable the ajp connector.

                  ProxyPass /superapp balancer://groupofajpserver/superapp

                  ProxyPassReverse /superapp balancer://groupofajpserver/superapp


                  #If in HTTP

                  ProxyPass /superapp balancer://groupofhttpserver/superapp

                  ProxyPassReverse /superapp balancer://groupofhttpserver/superapp


          Thanks,

          Maxime