Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 98102 invoked from network); 2 May 2010 10:15:35 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 May 2010 10:15:35 -0000 Received: (qmail 78274 invoked by uid 500); 2 May 2010 10:15:31 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 77450 invoked by uid 500); 2 May 2010 10:15:27 -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 77430 invoked by uid 99); 2 May 2010 10:15:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 May 2010 10:15:26 +0000 X-ASF-Spam-Status: No, hits=-1.1 required=10.0 tests=AWL,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 May 2010 10:15:18 +0000 Received: from localhost (localhost [127.0.0.1]) by tor.combios.es (Postfix) with ESMTP id 2CBB7226132 for ; Sun, 2 May 2010 12:14:21 +0200 (CEST) Received: from tor.combios.es ([127.0.0.1]) by localhost (tor.combios.es [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nN21A9fqOaG7 for ; Sun, 2 May 2010 12:14:21 +0200 (CEST) Received: from [192.168.245.129] (p549E0D80.dip0.t-ipconnect.de [84.158.13.128]) by tor.combios.es (Postfix) with ESMTPA id A112922611A for ; Sun, 2 May 2010 12:14:20 +0200 (CEST) Message-ID: <4BDD5097.3030205@ice-sa.com> Date: Sun, 02 May 2010 12:14:47 +0200 From: =?UTF-8?B?QW5kcsOpIFdhcm5pZXI=?= Reply-To: Tomcat Users List User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Tomcat Connector to Apache 2.2 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Jie Sheng Chua wrote: > Hi, > > I operating Ubuntu 10.04 with Tomcat 6.0.24 on OpenJDK 6b18-1.8. > I trying to configure tomcat connector to allow (for now) all request to be > pass from Apache 2.2 to Tomcat 6. > I downloaded mod_jk-1.2.28-httpd-2.2.X.so > . > With the help of the quick start > guide, > i manage to configure my workers.properties, httpd.conf and tomcat > server.xml as follows. > > After the below configuration, the connector didn't work. There are no error > display on the logs too. Can you define "didn't work" ? > Example context from tomcat is the tomcat supplied examples. > > Does anyone know how to make this work out? > > Thanks and Best Regards > Jie Sheng > > *workers.properties* > * > * > * > # Define 1 real worker using ajp13 > worker.list=tomcat1 > > # Set properties for worker1 (ajp13) > worker.tomcat1.type=ajp13 > worker.tomcat1.host=localhost > worker.tomcat1.port=8009 > * > Looks fine. > *httpd.conf* > > # Load mod_jk module > # Update this path to match your modules location > LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so > Looks fine, if the module is there. But otherwise I guess Apache would not start. > # Declare the module for (remove this line on Apache > 2.x) > # AddModule mod_jk.c > > # Where to find workers.properties > # Update this path to match your conf directory location (put > workers.properties next to httpd.conf) > JkWorkersFile /etc/apache2/workers.properties > > # Where to put jk shared memory > # Update this path to match your local state directory or logs directory > JkShmFile /var/log/apache2/mod_jk.shm > > # Where to put jk logs > # Update this path to match your logs directory location (put mod_jk.log > next to access_log) > JkLogFile /var/log/apache2/mod_jk.log > > # Set the jk log level [debug/error/info] > JkLogLevel info > > # Select the timestamp log format > JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " > > # Send everything for context /examples to worker named worker1 (ajp13) > JkMount /examples/* tomcat1 > Note that the above will ONLY forward to the connector and Tomcat, requests for URLs which match the above pattern, like /examples/something.html It will not forward the URL /examples For that, you would need a second JkMount JkMount /examples tomcat1 Also see note (1) below. > *tomcat server.xml* > * > * > * > > > SSLEngine="on" /> > > className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> > /> > className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> I believe your problem is here : > modJk="/usr/lib/apache2/modules/mod_jk.so" /> > Remove the above and try again. I believe that you tried to mix two different techniques : - trying to use the "Tomcat auto-configure" feature of mod_jk and - configuring mod_jk yourself I think that the two do not play well together. And anyway : - I am not sure that the auto-configure feature still works - the documentation also says that it is specific to Tomcat 5.x > > type="org.apache.catalina.UserDatabase" > description="User database that can be updated and saved" > factory="org.apache.catalina.users.MemoryUserDatabaseFactory" > pathname="conf/tomcat-users.xml" /> > > > > maxThreads="150" minSpareThreads="4"/> > connectionTimeout="20000" > URIEncoding="UTF-8" > redirectPort="8443" /> > The above is OK, leave it. > > resourceName="UserDatabase"/> > unpackWARs="true" autoDeploy="true" > xmlValidation="false" xmlNamespaceAware="false"> > > > > > > * > Note (1) : As an alternative to the JkMount/JkUnMount directives, there also exists the following (in the Apache httpd.conf) : SetHandler jakarta-servlet ... (You can also use instead of ) This is described here : http://tomcat.apache.org/connectors-doc/reference/apache.html , at the very end of the page, in the section "Using SetHandler and Environment Variables". Using this or the JkMount/JkUnMount syntax is a question of personal preference. I prefer this second form, because I find that it matches the general Apache configuration style better. It also makes it easier to add additional Apache directives to be applied to the URLs which you forward to Tomcat. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org