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 967F7D0B4 for ; Tue, 18 Sep 2012 15:47:37 +0000 (UTC) Received: (qmail 50154 invoked by uid 500); 18 Sep 2012 15:47:34 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 50015 invoked by uid 500); 18 Sep 2012 15:47:34 -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 50003 invoked by uid 99); 18 Sep 2012 15:47:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2012 15:47:33 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of john.d.rellis@gmail.com designates 209.85.219.45 as permitted sender) Received: from [209.85.219.45] (HELO mail-oa0-f45.google.com) (209.85.219.45) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2012 15:47:29 +0000 Received: by oagn12 with SMTP id n12so8053090oag.18 for ; Tue, 18 Sep 2012 08:47:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=bavWO0Hl7b+NKFwwCrGf2K/l4pYSPRWODFD4TYdzAHU=; b=awbvEROtcaTSI7nB3GAbLbkuHjBFxNs1WzRvyVYxz9i6mrvg8Aug35gn/y+EvHqidA IqiT8jxM+yXVtP8JHbdk1aayXxosg/jkMR0W0QQB8lAXrG3UV1wWdv/eYN6TYvdXntdK 4J+qsMqkNbH4i2FzwojleRtkPj/AILJft1yxpV5BwQTrmLjjXeDQ0mcH5qC0qgy20ZS4 g0zdS5pLQcv2UzJoU+4kZQrfR72YmSnEEWLkUjhni58poPu/Fta5gxKykf0mgwxGo//d wfP7R1WDfjOcnL5lF3drtgy16dz8Snuc6bx7ik4ffXYAMvv1N06OuLz2nc4o6cnlbddJ MvLA== Received: by 10.60.172.143 with SMTP id bc15mr369070oec.73.1347983228832; Tue, 18 Sep 2012 08:47:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.65.103 with HTTP; Tue, 18 Sep 2012 08:46:38 -0700 (PDT) In-Reply-To: <50588B84.20809@ice-sa.com> References: <50587FAE.7040300@ice-sa.com> <50588B84.20809@ice-sa.com> From: John Rellis Date: Tue, 18 Sep 2012 16:46:38 +0100 Message-ID: Subject: Re: Verifying mod_jk is installed To: Tomcat Users List Content-Type: multipart/alternative; boundary=bcaec54c527c8489b104c9fbcd70 X-Virus-Checked: Checked by ClamAV on apache.org --bcaec54c527c8489b104c9fbcd70 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, Sep 18, 2012 at 3:56 PM, Andr=E9 Warnier wrote: > John Rellis wrote: > >> Andr=E9, >> >> Thanks! OK, so I put >> >> JkMount /jkmanager/ jkstatus >> JkMount /jkmanager/* jkstatus >> >> Into apache2.conf and no success. I did however put it >> in sites-available/default >> >> >> ServerAdmin webmaster@localhost >> >> JkMount /jkmanager/ jkstatus >> JkMount /jkmanager/* jkstatus >> ..... >> >> And I can now hit host/jkmanager/ and I get a UI. >> >> Is this the expected behaviour??? >> >> Yes, but do not top-post. Read http://en.wikipedia.org/wiki/** > Posting_style#Choosing_the_**proper_posting_style > > In reality there are several factors at work here. We are getting into > Apache VirtualHost logic, and the logic of inheritance of JkMount from th= e > main Apache configuration to the virtual hosts. > To get a fuller explanation, see the online documentation and the > "JkMountCopy" directive. > > Briefly : > - for Apache httpd : > - generally, whatever "lives" outside a section belongs > to the "main" configuration, and basically acts as a default value for an= y > VirtualHost, /unless/ it is superseded by a similar directive inside a > section. > - for JkMount however : by default, a JkMount in the main httpd > configuration is /not/ inherited by the VirtualHost sections, /unless/ yo= u > use the JkMountCopy instruction appropriately. > > In addition, there is the logic determining which VirtualHost > configuration is really handling your request. > The first defined VirtualHost in the Apache httpd configuration (from top > to bottom) acts as the "default" VirtualHost. That means that for any > request where httpd cannot determine to which VirtualHost it is addressed > (because the hostname of the request does not match any "ServerName" of a > VirtualHost), Apache httpd will use this default virtual host configurati= on > to process the request. > > In your case, if you send a request to "http://(ip address)/x", and none > of your VirtualHost sections contains a "serverName (ip address)" matchin= g > exactly, then the request will be processed with the configuration of the > default VirtualHost. > Which is what is happening here. > > And the combination of all the above is why, when you put the JkMounts in > the default VirtualHost configuration section, it "works". > > But it is not really supposed to work that way. Your http request should > be properly addressed to a specific VirtualHost - by name - and this > VirtualHost configuration should be so that it contains the appropriate > JkMount directives (or a JkMountCopy directive, to inherit the JkMounts > from the main configuration). > > And I hope that you are not totally lost ater that. ;-) > > > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.**apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > Andr=E9, Thanks very much for your help. I put : ServerAdmin webmaster@localhost JkMount /ClusterApp/ LoadBalancer JkMount /ClusterApp/* LoadBalancer JkMount /jkmanager/ jkstatus JkMount /jkmanager/* jkstatus And it is now hitting my cluster after two days of agony soooo YEEEEEEEEEEESSSSSSSSS!!!! Phew! Your explanation is great, and with it, i put JkMountCopy in the virtual host and the url mappings in apache2.conf and it works! :) Beer! Thanks again. Regarding top posting, apologies, I am using gmail and I never noticed it was an issue on other lists but I of course respect the decision of each individual list! :) I'm not sure how to bottom post in gmail so I just put my reply after yours, hope its ok! --bcaec54c527c8489b104c9fbcd70--