Interesting. I'll have to try something similar for my situation.
What I'm trying to do is a bit of the reverse. I want hostname:80/tomcat-host/manager to end up at (tomcat-host) /manager for four different tomcat hosts. The forward stuff works fine, but the URLs coming back all drop the tomcat-host part. I guess reading some more documentation is in order. Glad you got it working without the reversproxy stuff. /mde/ ----- Original Message ---- From: Jeffrey Janner <jeffrey.jan...@polydyne.com> To: Tomcat Users List <users@tomcat.apache.org> Sent: Thu, November 4, 2010 1:12:07 PM Subject: RE: Is there a GOOD AJP-based cluster reference? In looking at the JSPs, the dev team is coding all the paths inside a <c:url> construct, which is why the context string is getting prepended to every path in the document. What was throwing me off a bit was the default doc was just a redirect as: ------------------------------------------------------ <%...@page contentType="text/html" pageEncoding="UTF-8"%> <% response.sendRedirect("login"); %> ------------------------------------------------------ The browser would show this as http://hostname/context/login. My interpretation of the docs had me thinking that the context would get stripped as well, but it wasn't. Thus the confusion. I have managed to get it working with the following: <Proxy balancer://mycluster> BalancerMember ajp://prtltest01:8009/Portal route=tomcat1 loadfactor=50 BalancerMember ajp://prtltest02:8009/Portal route=tomcat2 loadfactor=50 </Proxy> ProxyPass /Portal/static ! ProxyPass /Portal balancer://mycluster stickysession=JSESSIONID|jsessionid scolonpathdelim=On ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid scolonpathdelim=On Notice I don't have any ProxyPassReverse lines. From reading the docs, I'm not sure they are needed for AJP proxying. I'm trying to keep the Tomcat side of things fairly simple -- pretty much deploy the war direct from dev -- to keep there from being too many steps that could get screwed up when I'm not around and someone else needs to deploy. The process will be documented, but some people refuse to read directions correctly. Plus, the apache server will someday host multiple apps under one host, so having it work with the context as non-root now means less work later. Then again, I bf'ed and didn't put the static stuff in the proper tree structure under the htdocs dir. I just put them there as I got them. (There is no "static" directory on the Tomcat side, it's virtual. The dev team is doing weird stuff with this new product.) Let me know if you see any problems with the above config. Jeff > -----Original Message----- > From: Mark Eggers [mailto:its_toas...@yahoo.com] > Sent: Thursday, November 04, 2010 11:56 AM > To: Tomcat Users List > Subject: Re: Is there a GOOD AJP-based cluster reference? > > At the risk of violating your request (not to point you to the > documentation), > I'm going to point you at the documentation. > > In particular: manual/mod/mod_proxy.html#proxypassreverse (from the > Apache httpd > docs) > > This will rewrite response URLs. However, there is a caveat. It will > not rewrite > any absolute URLs within the documents served. So if you have > /context/somewhere/someplace inside a particular page, this link will > be > returned intact and the user will not be able to reach it. Again > according to > the document, you'll need to look at Nick Kew's mod_proxy_html > (http://apache.webthing.com/mod_proxy_html/). There appears to be a > tutorial on > reverse proxying at that location as well. > > You may find it far easier to just rename the war file to ROOT.war and > be done > with it. > > . . . . just my two cents > > /mde/ > > > ----- Original Message ---- > From: Jeffrey Janner <jeffrey.jan...@polydyne.com> > To: Tomcat Users List <users@tomcat.apache.org> > Sent: Thu, November 4, 2010 6:56:20 AM > Subject: Is there a GOOD AJP-based cluster reference? > > I've googled and not found anything very helpful, particularly nothing > recent. > > > > I am trying to set up AJP load balancing using Apache 2.2.17 to Tomcat > 6.0.29. > > I'd like to route root to the Tomcat named context (not root). From > the > docs I've read so far, I should be able to, but all the references in > the returned html have the context name stuck at the beginning of the > path, and I can't seem to get it to go away. > > > > I know I can just rename the context as ROOT, but I thought I'd try > deploying it the way the dev team gives it to me. > > > > I've tried: > > ProxyPass / balancer://mycluster/context > > <Proxy balancer=//mycluster> > > BalancerMember ajp://hostname:8009 > > </Proxy> > > and > > ProxyPass / balancer://mycluster > > <Proxy balancer=//mycluster> > > BalancerMember ajp://hostname:8009/context > > </Proxy> > > > > Nothing seems to be working. Obviously, I'm not clear on some concept. > > Any help would be appreciated. > > Jeff > > > > p.s. Don't send me to the Tomcat & Apache docs, I've read them. > > ================================================================= > Jeffrey W. Janner e-mail: jeffrey.jan...@polydyne.com > <mailto:jeffrey.jan...@polydyne.com> > PolyDyne Software Inc. web: http://www.polydyne.com/ > <http://www.polydyne.com/> > 9390 Research Blvd. phone: (512) 343-9100 x8930 > Building 1, Suite 400 fax: (512) 343-9297 > Austin, TX 78759 > ================================================================= > > > > _______________________________________________________________________ > ___ > > Confidentiality Notice: This Transmission (including any attachments) > may > contain information that is privileged, confidential, and exempt from > disclosure > under applicable law. If the reader of this message is not the > intended > recipient you are hereby notified that any dissemination, distribution, > or > copying of this communication is strictly prohibited. > > > If you have received this transmission in error, please immediately > reply to the > sender or telephone (512) 343-9100 and delete this transmission from > your > system. > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > __________________________________________________________________________ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org