Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 21200 invoked from network); 15 Jun 2010 18:08:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Jun 2010 18:08:51 -0000 Received: (qmail 75530 invoked by uid 500); 15 Jun 2010 18:08:48 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 75455 invoked by uid 500); 15 Jun 2010 18:08:47 -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 75446 invoked by uid 99); 15 Jun 2010 18:08:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jun 2010 18:08:47 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.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; Tue, 15 Jun 2010 18:08:39 +0000 Received: from localhost (localhost [127.0.0.1]) by tor.combios.es (Postfix) with ESMTP id 1FA1C226251 for ; Tue, 15 Jun 2010 20:06:55 +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 VhuE1KWR8GKu for ; Tue, 15 Jun 2010 20:06:55 +0200 (CEST) Received: from [192.168.245.129] (p549E19AA.dip0.t-ipconnect.de [84.158.25.170]) by tor.combios.es (Postfix) with ESMTPA id B28BA22624F for ; Tue, 15 Jun 2010 20:06:54 +0200 (CEST) Message-ID: <4C17C18F.40901@ice-sa.com> Date: Tue, 15 Jun 2010 20:08:15 +0200 From: =?ISO-8859-15?Q?Andr=E9_Warnier?= Reply-To: Tomcat Users List User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: RewriteRule rewrites, but mod_jk persists with old URI References: <4C177A41.7070801@ice-sa.com> <20100615161357.3df09750@tclx.cataneo.buero> <4C17AD4B.2010503@kippdata.de> In-Reply-To: <4C17AD4B.2010503@kippdata.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Rainer Jung wrote: > On 15.06.2010 16:13, Tobias Crefeld wrote: >> Am Tue, 15 Jun 2010 15:04:01 +0200 >> schrieb Andr� Warnier: >> >>> In other words, it appears to receive the URI "/mir/search.jsp", try >>> to map it to a worker, succeed, but then forwarding the request to >>> Tomcat as "/jsp/search.jsp" anyway (which was the original URL, not >>> the rewritten one). This "/jsp/search.jsp" is indeed not found by >>> Tomcat (because in Tomcat it is "/mir/search.jsp"), and I receive in >>> return a 404 error page from Tomcat. >> >> I'm not quite sure whether I have understood your problem but maybe >> this additional setting (after JkMount) helps: >> >> JkOptions +ForwardURIProxy > > Right, the Forward* JkOptions are the key here. There have been various > attempts during the lifetime of mod_jk to try getting this right, so > there are various possible options. Finally because of security > problems, ForwardURIProxy was introduced in 1.2.24 and made the new > default. > > http://tomcat.apache.org/connectors-doc/reference/apache.html#Forwarding > > explains the options and also the limitations with respect to > mod_rewrite. There's also a short note at > > http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html#URL%20Encoding > > > It is possible, that you have explicitely configure > ForwardURICompatUnparsed, i.e. please forward the original URI without > any interpretation, decoding etc. Since decoding cannot be undone, this > means any rewriting by mod_rewrite is not respected. This option was > only default at the exact version 1.2.23 but it existed as an option in > 1.2.18. > Hi. Thanks to both for your suggestions and explanations. The version of mod_jk on that system is 1.2.18, and I have not any of the JKOptions Forward* configured in my setup, which is just this : JkWorkersFile /etc/apache2/workers.properties JkLogFile /var/log/apache2/mod_jk.log JkLogLevel debug JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " Anyway, adding JkOptions +ForwardURICompat works ! (which is strange, because the docs says it should be the default before 1.2.22) Now I'll see if I can get a more recent mod_jk as a Debian package, and else I'll see if I can make one myself, so that I can use the latest default ForwardURIProxy. I also did not understand the reason why in the docs it says "This is .. not safe if you are using prefix JkMount." Anyone care to elaborate ? I am not using "prefix JkMount" specifically, but I am using SetHandler jakarta-servlet Does this un-safeness apply in that case also ? --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org