Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 11340 invoked from network); 2 Jan 2008 21:50:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jan 2008 21:50:11 -0000 Received: (qmail 74228 invoked by uid 500); 2 Jan 2008 21:49:48 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 74207 invoked by uid 500); 2 Jan 2008 21:49:48 -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 74195 invoked by uid 99); 2 Jan 2008 21:49:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 13:49:48 -0800 X-ASF-Spam-Status: No, hits=-2.5 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [195.227.30.246] (HELO datura.kippdata.de) (195.227.30.246) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 21:49:25 +0000 Received: from [192.168.2.102] ([192.168.2.102]) by datura.kippdata.de (8.13.5/8.13.5) with ESMTP id m02LnRgM026249 for ; Wed, 2 Jan 2008 22:49:28 +0100 (CET) Message-ID: <477C06C5.2020700@kippdata.de> Date: Wed, 02 Jan 2008 22:48:53 +0100 From: Rainer Jung User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: need help with Tomcat-generated redirects References: <477BBA6E.4CAF.003C.0@Toronto.CBC.CA> In-Reply-To: <477BBA6E.4CAF.003C.0@Toronto.CBC.CA> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi Julian, Julian Dunn schrieb: > Hi, > > I have some applications running under a Tomcat installation set up > in this way: > > [load balancer on port 80] ---> [Apache server on port 5001] --> > [Tomcat server on port 7001] > > One of the Tomcat applications sends a redirect to Apache because > there is a directive. However, the redirect that is > sent says: > > www.site.com:5001/foo/bar.jsp > > instead of > > www.site.com/foo/bar.jsp > > On the Apache side, I already have ServerName set to www.site.com:80 > to solve this problem for mod_rewrite. What is the corresponding > directive for Tomcat? How do you connect Apache to Tomcat? If you are using mod_jk, the module gets the port it sends to Tomcat via ap_get_server_port(), which in turn depends on UseCanonicalName. If this is set to On, the port is also determined from the port in ServerName. The AJP protocol then makes sure, that Tomcat thinks it's using the port that mod_jk told Tomcat. In case this doesn't work or you are using some other way to connect Apache to Tomcat: The connector element in server.xml knows about attributes proxyName, proxyPort and scheme. See http://tomcat.apache.org/tomcat-6.0-doc/config/http.html > - Julian Regards, Rainer --------------------------------------------------------------------- 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