Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 70575 invoked from network); 27 Nov 2007 14:10:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Nov 2007 14:10:57 -0000 Received: (qmail 48399 invoked by uid 500); 27 Nov 2007 14:10:32 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 48372 invoked by uid 500); 27 Nov 2007 14:10:32 -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 48361 invoked by uid 99); 27 Nov 2007 14:10:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Nov 2007 06:10:32 -0800 X-ASF-Spam-Status: No, hits=3.5 required=10.0 tests=HTML_MESSAGE,SPF_PASS,WEIRD_PORT,WHOIS_NETSOLPR X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of p.stavrinides@albourne.com designates 213.207.142.99 as permitted sender) Received: from [213.207.142.99] (HELO boran.albourne.com) (213.207.142.99) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Nov 2007 14:10:29 +0000 Received: from [192.168.51.80] (tess.intern.albourne.com [192.168.51.80]) by boran.albourne.com (8.13.3/8.13.3/Albourne/FW/DNSBL) with ESMTP id lARE9x29015392 for ; Tue, 27 Nov 2007 14:10:07 GMT Message-ID: <474C2530.4020304@albourne.com> Date: Tue, 27 Nov 2007 16:09:52 +0200 From: Peter Stavrinides User-Agent: Thunderbird 2.0.0.6 (X11/20071022) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Tomcat 5.5, Apache 2.0.XX and mod_proxy References: <13970134.post@talk.nabble.com> In-Reply-To: <13970134.post@talk.nabble.com> Content-Type: multipart/alternative; boundary="------------040005030705010100030502" X-Virus-Checked: Checked by ClamAV on apache.org --------------040005030705010100030502 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Thats because your configuration is incomplete, in order for Apache to pass the cookie to the correct context you need to do some additional configuration (or alternatively use a connector like mod_jk) You may need to configure the jvmRoute parameter in server.xml, this allows Apache to map to the correct Tomcat context, otherwise deploy your web app in the Tomcat root context. You also need to add a server mapping in Apache, one way to do this easily is with a RewriteMap. (If you use Apache 2.2 then you could use the in-built mod_proxy_balancer module). I also use Apache 2.0 so I just make a static mapping, which looks something like this: RewriteMap SERVERS rnd:/etc/apache2/servers.conf -------------- servers.conf -------------- T1 tomcat.server.com:8081 ALL tomcat.server.com:8081 #configure more instances for load balancing if you wish Peter mip wrote: > I'm trying to proxy my Tomcat web application through Apache 2.0 using > mod_proxy. > > I have uncommented the following in my server.xml: > > > > maxThreads="150" minSpareThreads="25" maxSpareThreads="75" > enableLookups="false" > acceptCount="100" debug="0" connectionTimeout="20000" > proxyPort="80" disableUploadTimeout="true" /> > > and I've added the following to my httpd.conf: > > > ServerName foo.bar.com > ProxyPass / http://foobar.com:8082/app/ > ProxyPassReverse / http://foobar.com:8082/app/ > > > The pages are being passed without any problems but the sessions are being > lost as cookies are not being passed. I'm guessing I need to add something > to the above stanza which rewrite the cookies. But what? > --------------040005030705010100030502--