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 219BD9E6A for ; Tue, 17 Apr 2012 20:13:21 +0000 (UTC) Received: (qmail 15816 invoked by uid 500); 17 Apr 2012 20:13:17 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 15581 invoked by uid 500); 17 Apr 2012 20:13:17 -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 15571 invoked by uid 99); 17 Apr 2012 20:13:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Apr 2012 20:13:17 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [195.130.137.68] (HELO georges.telenet-ops.be) (195.130.137.68) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Apr 2012 20:13:09 +0000 Received: from [192.168.1.109] ([84.198.206.133]) by georges.telenet-ops.be with bizsmtp id z8Co1i0092tD98c068Co46; Tue, 17 Apr 2012 22:12:49 +0200 Message-ID: <4F8DCEBF.9060307@kantl.be> Date: Tue, 17 Apr 2012 22:12:47 +0200 From: "ron.vandenbranden@home" User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Tomcat Users List CC: Pid Subject: Re: adding a global URI prefix for Tomcat web apps References: <4F8D6122.40609@kantl.be> <4F8DC19A.5090705@pidster.com> In-Reply-To: <4F8DC19A.5090705@pidster.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Pid, Thanks for your suggestion. On 17/04/2012 21:16, Pid wrote: > From the docs: > > ProxyPass /mirror/foo/ http://backend.example.com/ > ProxyPassReverse /mirror/foo/ http://backend.example.com/ > > http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassreverse > > ProxyPassReverse is designed to be used to address the situation you > describe, you just appear to be using it incorrectly. > I think your ProxyPassReverse setting only works with ProxyPreserveHost switched off: in that case, the my_app Tomcat app, when proxied via http://mydomain/apps/my_app/ will 'see' (and generate) links like http://localhost:8082/my_app/. This will only work if Tomcat is running on a public port; not when it is hidden behind a firewall. That's why I arrived at using ProxyPreserveHost. In order to make this work, the ProxyPassReverse setting must refer to the public URL (see advice at ). Following settings do work, mostly: On 17/04/2012 13:25, ron.vandenbranden@home wrote: > ProxyPreserveHost on > ProxyPass /apps/ http://localhost:8082/ > ProxyPassReverse /apps/ http://mydomain/ Yet, here too, all the my_app Tomcat app sees from the request is http://mydomain/my_app/, since the '/app/' part has been filtered out after the proxy handling. Consequently, those links won't work. That's why I tried if I could add '/app/' as a global path prefix to Tomcat apps. Kind regards, Ron --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org