Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5B290200B95 for ; Tue, 27 Sep 2016 18:59:27 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 59BB5160AD2; Tue, 27 Sep 2016 16:59:27 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9EC7B160AB9 for ; Tue, 27 Sep 2016 18:59:26 +0200 (CEST) Received: (qmail 91426 invoked by uid 500); 27 Sep 2016 16:59:25 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 91417 invoked by uid 99); 27 Sep 2016 16:59:25 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Sep 2016 16:59:25 +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 4B9821A546A for ; Tue, 27 Sep 2016 16:59:25 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.374 X-Spam-Level: X-Spam-Status: No, score=0.374 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id AfMhaQSC_duM for ; Tue, 27 Sep 2016 16:59:23 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTP id A56B45FBE1 for ; Tue, 27 Sep 2016 16:59:22 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id DC8BCE015D for ; Tue, 27 Sep 2016 16:59:21 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id DA2013A0478 for ; Tue, 27 Sep 2016 16:59:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1762517 - in /httpd/httpd/trunk: docs/log-message-tags/next-number modules/proxy/mod_proxy.c Date: Tue, 27 Sep 2016 16:59:21 -0000 To: cvs@httpd.apache.org From: jchampion@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160927165921.DA2013A0478@svn01-us-west.apache.org> archived-at: Tue, 27 Sep 2016 16:59:27 -0000 Author: jchampion Date: Tue Sep 27 16:59:21 2016 New Revision: 1762517 URL: http://svn.apache.org/viewvc?rev=1762517&view=rev Log: mod_proxy: log diagnostics during ProxyPass[Match] To help out users when debugging ProxyPass and ProxyPassMatch, log all match attempts (at trace2), as well as matches that are either successful or explicitly disabled (at trace1). Modified: httpd/httpd/trunk/docs/log-message-tags/next-number httpd/httpd/trunk/modules/proxy/mod_proxy.c Modified: httpd/httpd/trunk/docs/log-message-tags/next-number URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/log-message-tags/next-number?rev=1762517&r1=1762516&r2=1762517&view=diff ============================================================================== --- httpd/httpd/trunk/docs/log-message-tags/next-number (original) +++ httpd/httpd/trunk/docs/log-message-tags/next-number Tue Sep 27 16:59:21 2016 @@ -1 +1 @@ -3461 +3465 Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.c?rev=1762517&r1=1762516&r2=1762517&view=diff ============================================================================== --- httpd/httpd/trunk/modules/proxy/mod_proxy.c (original) +++ httpd/httpd/trunk/modules/proxy/mod_proxy.c Tue Sep 27 16:59:21 2016 @@ -666,9 +666,18 @@ PROXY_DECLARE(int) ap_proxy_trans_match( fake = ent->fake; real = ent->real; } + + ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, APLOGNO(03461) + "attempting to match URI path '%s' against %s '%s' for " + "proxying", r->uri, (ent->regex ? "pattern" : "prefix"), + fake); + if (ent->regex) { if (!ap_regexec(ent->regex, r->uri, AP_MAX_REG_MATCH, regm, 0)) { if ((real[0] == '!') && (real[1] == '\0')) { + ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, APLOGNO(03462) + "proxying is explicitly disabled for URI path " + "'%s'; declining", r->uri); return DECLINED; } /* test that we haven't reduced the URI */ @@ -712,6 +721,9 @@ PROXY_DECLARE(int) ap_proxy_trans_match( if (len != 0) { if ((real[0] == '!') && (real[1] == '\0')) { + ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, APLOGNO(03463) + "proxying is explicitly disabled for URI path " + "'%s'; declining", r->uri); return DECLINED; } if (nocanon && len != alias_match(r->unparsed_uri, ent->fake)) { @@ -740,6 +752,11 @@ PROXY_DECLARE(int) ap_proxy_trans_match( if (ent->flags & PROXYPASS_NOQUERY) { apr_table_setn(r->notes, "proxy-noquery", "1"); } + + ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, APLOGNO(03464) + "URI path '%s' matches proxy handler '%s'", r->uri, + found); + return OK; }