Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9E0A87EB5 for ; Sat, 22 Oct 2011 16:43:38 +0000 (UTC) Received: (qmail 64411 invoked by uid 500); 22 Oct 2011 16:43:35 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 64219 invoked by uid 500); 22 Oct 2011 16:43:35 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 64210 invoked by uid 99); 22 Oct 2011 16:43:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Oct 2011 16:43:35 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of eldono@ns.sympatico.ca designates 4.59.182.102 as permitted sender) Received: from [4.59.182.102] (HELO omta4.toronto.rmgopenwave.com) (4.59.182.102) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Oct 2011 16:43:27 +0000 Received: from torspm04.toronto.rmgopenwave.com ([99.192.94.161]) by tormtz05.toronto.rmgopenwave.com (InterMail vM.8.01.04.04 201-2260-137-107-20110204) with ESMTP id <20111022164251.TFVT6248.tormtz05.toronto.rmgopenwave.com@torspm04.toronto.rmgopenwave.com> for ; Sat, 22 Oct 2011 12:42:51 -0400 Received: from [192.168.3.104] (really [99.192.94.161]) by torspm04.toronto.rmgopenwave.com with ESMTP id <20111022164251.SYFB21373.torspm04.toronto.rmgopenwave.com@[192.168.3.104]> for ; Sat, 22 Oct 2011 12:42:51 -0400 Message-ID: <4EA2F286.9010005@ns.sympatico.ca> Date: Sat, 22 Oct 2011 13:42:46 -0300 From: Eldon Olmstead User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: URI mapping References: <4EA2EB42.5050309@ns.sympatico.ca> <4EA2EC96.6060407@apache.org> In-Reply-To: <4EA2EC96.6060407@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Opwv-CommTouchExtSvcRefID: str=0001.0A020209.4EA2F28B.0089,ss=1,re=0.000,fgs=0 Thanks for the response Mark, Ok so if I want to keep mod_jk as part of this, ( it is what we use at work ), then if I understand right, I have no choice but to make tomcat support /tomcat7/ in the path. Do I do this just by moving all the webapps under webapps/tomcat7/? Will I have to make other configuration changes? What is the right way to do this? The way we have it at work is that each tomcat worker is pointing to one developer's tomcat installation for the developer to do with as they need. On 2011-10-22 1:17 PM, Mark Thomas wrote: > On 22/10/2011 17:11, Eldon Olmstead wrote: >> Hello, >> >> I'm using the following >> Apache2.2 >> mod_jk 1.2.32 >> Tomcat 7.0.21 >> >> I am trying to understand how to configure Apache to allow access to >> Tomcat via mod_jk. I have already made some progress, but have got stuck >> on one point. >> >> Currently, I can access Apache at http://localhost ( works ) >> I can also access tomcats default wepapp and the manager and >> host-manager via >> >> http://localhost:8080/ >> http://localhost:8080/manager >> http://localhost:8080/host-manager >> >> >> What I want to do next it to connect Apache to Tomcat via mod_jk such >> that the following URLs work >> >> http://localhost/tomcat7/ ( default tomcat webapp) >> http://localhost/tomcat7/manager >> http://localhost/tomcat7/host-manager >> >> >> I have updated the workers.properties with: >> >> worker.list=tomcat7 >> worker.tomcat7.type=ajp13 >> worker.tomcat7.host=localhost >> worker.tomcat7.port=8809 >> >> I have added the the following in my http-jk.conf that I include in >> http.conf: >> >> JkMount /tomcat7/* tomcat7 >> >> When I try to access http://localhost/tomcat7, tomcat is given the URI >> /tomcat7/ >> >> 127.0.0.1 - - [22/Oct/2011:11:34:20 -0300] "GET /tomcat7/ HTTP/1.1" >> 404 979 >> >> So from the above log, I know that apache is forwarding the requests to >> tomcat via mod_jk ok, but tomcat now thinks that /tomcat7/ is now part >> of the request and since there is no tomcat7 web app, it doesn't match >> the request. >> >> I would like http://localhost/tomcat7/ to map to the root of my Tomcat, >> and to be able to access http://localhost/tomcat7/manager, >> http://localhost/tomcat7/host-manager. >> >> What do I do next? > If you want to modify the URL, you'll need to use mod_proxy. Then you > can do: > > ProxyPass /tomcat7 http://localhost:8080 > or > ProxyPass /tomcat7 ajp://localhost:8080 > > Note that as soon as you start modifying the URL as part of the > ProxyPass you open up a world of opportunity for things to go wrong > (redirects, cookie paths, links). All of these are fixable but it is a > lot easier just to use the same URL structure in both httpd and Tomcat. > > Mark > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org