Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 84854 invoked from network); 2 Jan 2008 16:37:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jan 2008 16:37:35 -0000 Received: (qmail 19953 invoked by uid 500); 2 Jan 2008 16:37:13 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 19933 invoked by uid 500); 2 Jan 2008 16:37:13 -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 19922 invoked by uid 99); 2 Jan 2008 16:37:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 08:37:13 -0800 X-ASF-Spam-Status: No, hits=-1.6 required=10.0 tests=NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_MED,SPF_PASS,URIBL_RHS_DOB,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [193.56.114.156] (HELO smtp2.fr.adp.com) (193.56.114.156) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 16:37:01 +0000 Received: from exchange2k304.gaia.fr ([150.175.10.77]) by smtp2.fr.adp.com (xx/xx) with ESMTP id m02GarhV005797 for ; Wed, 2 Jan 2008 17:36:53 +0100 Received: from EXCHSUR.gaia.fr ([150.175.3.51]) by exchange2k304.gaia.fr with Microsoft SMTPSVC(6.0.3790.1830); Wed, 2 Jan 2008 17:36:53 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Wed, 2 Jan 2008 17:36:53 +0100 Message-ID: <28D87C00C6E83540A814CFAE3FA63E3F53A24C@EXCHSUR.gaia.fr> In-Reply-To: <3f81a4240801020813v32eec263o107f0de5695caa0c@mail.gmail.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [users@httpd] Needing help with mod_proxy Thread-Index: AchNWoL7jjttIeadTcS9TTY8NkfaqAAAMHKg References: <3f81a4240712311824r4f6e7a0bj1838d6faab934cca@mail.gmail.com> <28D87C00C6E83540A814CFAE3FA63E3F539E97@EXCHSUR.gaia.fr> <3f81a4240801020813v32eec263o107f0de5695caa0c@mail.gmail.com> From: "Axel-Stephane SMORGRAV" To: X-OriginalArrivalTime: 02 Jan 2008 16:36:53.0721 (UTC) FILETIME=[AEA20490:01C84D5D] X-Virus-Checked: Checked by ClamAV on apache.org Subject: RE: [users@httpd] Needing help with mod_proxy My fault. I guess that what is happening is that the browser is being = redirected and the Location header is not rewritten because I omitted = the ProxyPassReverse directives. =20 Try adding: =20 ProxyPassReverse /otherapp/ http://127.0.0.1:3001/ ProxyPassReverse / http://127.0.0.1:3000/ =20 There is another problem due to you removal of the %{REQUEST_URI} for = /otherapp. You do not want to strip off the whole URI while proxying. = You probably only want to strip off /otherapp. So now try this = configuration: RewriteEngine On RewriteLogLevel 9 # You should not need this if you use mod_dir RewriteRule ^/$ /index.html [R] RewriteCond %{REQUEST_URI} ^/otherapp(.*) RewriteRule . http://127.0.0.1:3001%1 [L,P] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f RewriteRule . http://127.0.0.1:3000%{REQUEST_URI} [L,P] # I here assume that ProxyPreserveHost is Off ProxyPassReverse /otherapp/ http://127.0.0.1:3001/ ProxyPassReverse / http://127.0.0.1:3000/ =20 -ascs=20 ________________________________ De : Bryan Richardson [mailto:btricha@gmail.com]=20 Envoy=E9 : mercredi 2 janvier 2008 17:13 =C0 : users@httpd.apache.org Objet : Re: [users@httpd] Needing help with mod_proxy Hi again Axel. I tried out what you said and I'm still having some = problems. Below is what I have in my site's config file. This makes it = possible for me to go to www.mysite.com/otherapp and I will get = forwarded to my Rails app server at port 3001. Notice I had to leave = %{REQUEST_URI} off the end of the RewriteRule for my otherapp rule. = However, if I then click on a link within my Rails app, it tries to go = to www.mysite.com/controller rather than = www.mysite.com/otherapp/controller. How can I make it such that my = Rails app thinks that www.mysite.com/otherapp is its root rather than = www.mysite.com? Thanks again for your help! -- BTR Order deny,allow=20 Allow from All RewriteEngine On RewriteRule ^/$ /index.html [QSA] RewriteCond %{REQUEST_URI} ^/otherapp RewriteRule . http://127.0.0.1:3001 [L,P] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f RewriteRule . http://127.0.0.1:3000%{REQUEST_URI} [L,P] --------------------------------------------------------------------- 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