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 5914418A34 for ; Fri, 31 Jul 2015 07:04:22 +0000 (UTC) Received: (qmail 7715 invoked by uid 500); 31 Jul 2015 07:04:18 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 7681 invoked by uid 500); 31 Jul 2015 07:04:18 -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 7669 invoked by uid 99); 31 Jul 2015 07:04:18 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Jul 2015 07:04:18 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id F1D3B1A9338 for ; Fri, 31 Jul 2015 07:04:17 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.174 X-Spam-Level: ** X-Spam-Status: No, score=2.174 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, NML_ADSP_CUSTOM_MED=1.2, SPF_SOFTFAIL=0.972, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id myxDklr0IKZz for ; Fri, 31 Jul 2015 07:04:08 +0000 (UTC) Received: from mbob.nabble.com (mbob.nabble.com [162.253.133.15]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTP id 9765420593 for ; Fri, 31 Jul 2015 07:04:07 +0000 (UTC) Received: from malf.nabble.com (unknown [162.253.133.59]) by mbob.nabble.com (Postfix) with ESMTP id 5F290124C39A for ; Fri, 31 Jul 2015 00:03:35 -0700 (PDT) Date: Thu, 30 Jul 2015 23:57:56 -0700 (PDT) From: shailender To: users@httpd.apache.org Message-ID: <1438325876635-5023061.post@n6.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: [users@httpd] apache being used as proxy server not working properly Hi, I have scenario where serverA -> serverB(apache) -> serverC. scenario we have is serverC can be any ipAddress which will be provided by serverA in Request to apache. Request send by serverA is /Command1/10.10.10.10:80 I have define proxypass rules in my httpd.conf. Below are same KeepAliveTimeout 5 MaxKeepAliveRequests 5 Timeout 5 KeepAlive on ProxyPreserveHost On ProxyTimeout 5 ProxyRequests off ProxyPass /Command1/ip=(.*) http://$1/Command1 ProxyPassReverse /Command1/ip=(.*) http://$1/Command1 When I restart apache and send request i get error which i see in error logs AH00128: File does not exist: /somePath/Command1/ip=10.10.10.10:80 If I hardcode the ip in proxypass the everything works fine. But as I stated serving ip has to be picked from request send by serverA. I then tried using Rewrite rule for proxy, which is as below KeepAliveTimeout 5 MaxKeepAliveRequests 5 Timeout 5 KeepAlive on ProxyPreserveHost On ProxyTimeout 5 ProxyRequests off RewriteEngine On RewriteRule /Command1/ip=(.*) http://$1/Command1 [P] After using rewrite I'm able to forward request to serverC, but all the request are not being send. Also in logs i see AH02642: proxy: connection shutdown Above message is logged aeverytime after apache had send request to serverC. Could anybody please help me in resolving this. What I'm looking for is all requests being propagated to correct server. Thanks -- View this message in context: http://apache-http-server.18135.x6.nabble.com/apache-being-used-as-proxy-server-not-working-properly-tp5023061.html Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org