Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 12785 invoked from network); 30 Jun 2010 14:27:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Jun 2010 14:27:51 -0000 Received: (qmail 69469 invoked by uid 500); 30 Jun 2010 14:27:48 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 69393 invoked by uid 500); 30 Jun 2010 14:27:47 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 69385 invoked by uid 99); 30 Jun 2010 14:27:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jun 2010 14:27:47 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tevans.uk@googlemail.com designates 209.85.160.173 as permitted sender) Received: from [209.85.160.173] (HELO mail-gy0-f173.google.com) (209.85.160.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jun 2010 14:27:41 +0000 Received: by gye5 with SMTP id 5so476843gye.18 for ; Wed, 30 Jun 2010 07:26:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=pQ/F489jZXy5mZVPJnLxBF3KaUFeSjtRFrG+pr7282I=; b=oD4HsrL7VzCnY76jvXoZ9ei+2Z1aVBs4tBicUzLOwLF7zESlNb8C/luvlWDygkslGm FVwQfz0IWTJhckXAmaoPT+3DYJqXr4kc7BOf4UMEQsy2GxAln8oPuFAedr/zsu6+bDvy yrg45mQvIAzsqSC91yOzVB4IhuQ/OSrmJXCjE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=ZpJdi637hTzR8M9Ip4gv+2LblSPg/zDDTs+ulLi5XfloPq/hMf28pQH8nAp0JdTPZV S7oczypG9xwQRZn0xhdl+v2pCNey6WNhIyhfo+HqYk/wPZzAoTEODjBYyCVvj+JtkaEG QKCtnhags8Z803aMehw1WjgAtzGB/jHERdmfg= MIME-Version: 1.0 Received: by 10.239.158.66 with SMTP id t2mr598049hbc.76.1277907970138; Wed, 30 Jun 2010 07:26:10 -0700 (PDT) Received: by 10.239.185.1 with HTTP; Wed, 30 Jun 2010 07:26:10 -0700 (PDT) In-Reply-To: <4C2B4B83.2070306@proximic.com> References: <4C2B4B83.2070306@proximic.com> Date: Wed, 30 Jun 2010 15:26:10 +0100 Message-ID: From: Tom Evans To: users@httpd.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Reverse Proxy with partial paths possible On Wed, Jun 30, 2010 at 2:49 PM, Dirk Taggesell wrote: > Hi all, > > I run an Apache 2.2.11 for several virtual hosts and I configured > several reverse proxy directives which are working as intended. > > Now I received a request to configure some additional rules, like these: > > ProxyPass =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /bla/ =C2=A0ht= tp://first-back-end:8000/ > ProxyPassReverse =C2=A0 =C2=A0 =C2=A0 =C2=A0/bla/ =C2=A0http://first-back= -end:8000/ > > ProxyPass =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /bla/req http:= //second-back-end:9200/req > ProxyPassReverse =C2=A0 =C2=A0 =C2=A0 =C2=A0/bla/req http://second-back-e= nd:9200/req > > While the first one works as intended, the second one is somewhat > special: it is intended to route requests like this: > > http://frontend/req.txt?some=3Darguments&and=3Devensomemore > > as well as > > http://frontend/req.xml?some=3Darguments&and=3Devensomemore > > to the second backend. And introducing an additional path like > > http://frontend/path/req.xml?some=3Darguments&and=3Devensomemore > > is not allowed, though it would make the whole thing much easier. > > Can the desired behaviour being achieved with a simple reverse proxy > directive? Or would I need ProxyReverseMatch or something? > > -- > kind regards > Dirk Taggesell > This should work I think, but you have the order the wrong way around. Put the most specific path first, the least specific last. Eg: ProxyPass /req http://app2/req ProxyPassReverse /req http://app2/req ProxyPass / http://app/ ProxyPassReverse / http://app/ Cheers Tom --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org