Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 94058 invoked from network); 20 Jul 2008 13:46:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Jul 2008 13:46:07 -0000 Received: (qmail 49286 invoked by uid 500); 20 Jul 2008 13:45:54 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 49256 invoked by uid 500); 20 Jul 2008 13:45:54 -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 49244 invoked by uid 99); 20 Jul 2008 13:45:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Jul 2008 06:45:54 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [212.85.38.174] (HELO popeye.combios.es) (212.85.38.174) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Jul 2008 13:44:57 +0000 Received: from [192.168.245.129] (p549EB5EE.dip0.t-ipconnect.de [84.158.181.238]) (authenticated bits=0) by popeye.combios.es (8.13.8/8.13.8/Debian-3) with ESMTP id m6KDjBXU032262 for ; Sun, 20 Jul 2008 15:45:12 +0200 Message-ID: <4883414A.1040304@ice-sa.com> Date: Sun, 20 Jul 2008 15:44:42 +0200 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Multiple websites in tomcat References: <48820AAF.30703@ngasi.com> <48821275.6090505@kippdata.de> <48821876.9090008@kippdata.de> <48823F9F.3070605@ice-sa.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on popeye.combios.es X-Virus-Scanned: ClamAV 0.92.1/7761/Sun Jul 20 13:38:15 2008 on popeye.combios.es X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-97.9 required=2.5 tests=RCVD_IN_PBL, RCVD_IN_SORBS_DUL,USER_IN_WHITELIST autolearn=no version=3.2.3 The good news is that you will learn more by encountering problems and solving them, than if everything worked correctly on the first pass. Ravi Sharma wrote: [...] > Alias /ex /usr/java/tomcat-5.5/webapps/servlets-examples > JkMount /ex/servlet/* testWorker I think that the two lines above conflict with eachother : First you are telling Apache that if it sees "/ex" in a URI, it should translate it to "/usr/java/tomcat-5.5/webapps/servlets-examples". Then you are telling Apache that if it sees a URI like "/ex/servlet/*", it should pass it to mod_jk (which will pass it to Tomcat). Here is my guess as to what happens, step by step : You send the following request to Apache : /ex/servlet/HelloWorldExample Because of the "Alias", Apache will first translate this to the file location /usr/java/tomcat-5.5/webapps/servlets-examples/HelloWorldExample Then Apache will try to find a "handler" for that location. Because mod_jk is installed, Apache will ask mod_jk if it is interested in this URI. mod_jk will say no, because the above translated URI does not match "/ex/servlet/*" in the JkMount. So mod_jk will return "DECLINED" to Apache. Then Apache will ask other possible handlers, and if nobody else wants this URI, then Apache will select its own default handler (the one which just returns local files). This default handler will try to find the file /usr/java/tomcat-5.5/webapps/servlets-examples/HelloWorldExample and will not find it. So it will return an error. The point is that an "Alias" happens earlier in the cycle of processing the request (the "URI translation" step), and the "content generation" step happens later. mod_jk (and Tomcat) are involved in the "content-generation" phase. But by the time mod_jk is getting asked if it wants to generate the content, the URI is already tanslated, and mod_jk does not recognise it. In short, for a test of the above, comment out the "Alias" line, restart Apache, and try again the URL http://www.jaatmusic.com/ex/servlet/HelloWorldExample Of course, with the above change, your first URL http://www.jaatmusic.com/ex will probably not work anymore, but that is normal and we will see that next. For a bit more more information on the order in which the various request processing steps happen in Apache, read through this : http://httpd.apache.org/docs/2.2/developer/request.html For the same with pictures, try this : http://www.apachetutor.org/dev/request Andr� --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org