Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-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 59A8BD85A for ; Sun, 18 Nov 2012 22:49:27 +0000 (UTC) Received: (qmail 53425 invoked by uid 500); 18 Nov 2012 22:49:24 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 53395 invoked by uid 500); 18 Nov 2012 22:49:24 -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 53387 invoked by uid 99); 18 Nov 2012 22:49:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Nov 2012 22:49:24 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of yanghatespam@gmail.com designates 209.85.223.173 as permitted sender) Received: from [209.85.223.173] (HELO mail-ie0-f173.google.com) (209.85.223.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Nov 2012 22:49:16 +0000 Received: by mail-ie0-f173.google.com with SMTP id k14so2414602iea.18 for ; Sun, 18 Nov 2012 14:48:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=VqWo4gmAaSinCrtJ+y3CavYRcK+SSDBvhxrfc3TwFos=; b=FcJ1/gIg1js/ZD5Qf+ZGZpUIeAKWNSLNoU3cjE6QEai2wQk0TnqSYTusTPsOue969U 4O0GgSIZY2pW25ZCcREbZ+/5ghMVp81jJZbz8Rp7WXsQwFt4XUKQcFB2PzDZR2ufc212 HBJ5yWafeXylJDDs79yc3jU9wKiCpAECkrkyNGy5VLrIKfWGyMZuSSyMEiygyPjIBIwN bCpGUOZLnDrsB0Fx2Xgk5lZ5PTfHY3Cezjvgra/zA3yQhINk5OjebQr2Os/eVGLwl2we BiZ0tRWzjm9ln8pKOiOle5vcbxJpDw9SL8mF80BfdRRBiaX5MSLyB9N2ZEKBOiDCdMPp jZ7Q== Received: by 10.50.151.166 with SMTP id ur6mr4987256igb.66.1353278936159; Sun, 18 Nov 2012 14:48:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.24.242 with HTTP; Sun, 18 Nov 2012 14:48:35 -0800 (PST) From: Yang Zhang Date: Sun, 18 Nov 2012 14:48:35 -0800 Message-ID: To: users@httpd.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Subject: [users@httpd] How to prevent mod_proxy from rewriting redirects into absolute URLs? I have: nginx (port 80) reverse-proxying to apache2 (port 88) reverse-proxying to a web app (port 5001). However, when the web app responds with a redirect like `Location: /foo`, apache2 rewrites this into `Location: http://host.com:88/sub/foo`, even though port 88 is publicly inaccessible. I'd like it to just redirect to the relative URL `Location: /sub/foo`. Any ideas? My apache config (using mod_proxy_http, mod_proxy_html, mod_substitute): Allow from all ProxyPass http://127.0.0.1:5001/ SetOutputFilter proxy-html ProxyPassReverse / ProxyHTMLURLMap / /notes/ RequestHeader unset Accept-Encoding AddOutputFilterByType SUBSTITUTE application/atom+xml Substitute "s|127.0.0.1:5001|host.com/notes|" Thanks. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org