Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1FEDF10459 for ; Sun, 30 Nov 2014 22:48:29 +0000 (UTC) Received: (qmail 53196 invoked by uid 500); 30 Nov 2014 22:48:28 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 53137 invoked by uid 500); 30 Nov 2014 22:48:28 -0000 Mailing-List: contact dev-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 dev@httpd.apache.org Received: (qmail 53127 invoked by uid 99); 30 Nov 2014 22:48:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Nov 2014 22:48:28 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ylavic.dev@gmail.com designates 209.85.213.177 as permitted sender) Received: from [209.85.213.177] (HELO mail-ig0-f177.google.com) (209.85.213.177) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Nov 2014 22:48:02 +0000 Received: by mail-ig0-f177.google.com with SMTP id z20so7888866igj.16 for ; Sun, 30 Nov 2014 14:48:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=exV/PDiHOfcMtsvSECM8yVygPabH5hVolXE+YVy9cLg=; b=Dw0EtyDwtDlPMbkt2Dk8hbOy9OGblg6uD/BErvIjBIv7a87zL0V/WW3lxJrH4UHvI+ xKHdXL9sWOiWK1qgG7J0PXhJfwy9BVJREtsCZ54hUbRCiHbWj8bh+5UfcPGXH/0XGqP4 e6qCW+4RDn1kvI9SlClJE+6g3Ln3tjwqARDGfHPvKssls3Dzmrxm/pvpsSgnYcHiR2fa hvMn/FP8FSHTHBa4/XZZNzh+GITN0tM7s8GuqHbXuXDuuSVQ8APQ1HkUaoSq85ERwphQ ITikgQacIYE/9EtzXfTQfeFDxN3Brk4TldI8TLe1biSU5tz7E4/NOyCtQ3FBGqelJ/xf mUMQ== MIME-Version: 1.0 X-Received: by 10.50.79.135 with SMTP id j7mr43047857igx.14.1417387680870; Sun, 30 Nov 2014 14:48:00 -0800 (PST) Received: by 10.42.255.7 with HTTP; Sun, 30 Nov 2014 14:48:00 -0800 (PST) In-Reply-To: References: <9C8824FA-A1C5-4F2C-A057-61F47809039A@jaguNET.com> <7AF9BD7E-625C-415B-8E1B-337C4D5A2D38@jaguNET.com> Date: Sun, 30 Nov 2014 23:48:00 +0100 Message-ID: Subject: Re: mod_rewrite/proxy UDS issues From: Yann Ylavic To: httpd Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Nov 28, 2014 at 1:56 PM, Eric Covener wrote: > Did this become unnecessary when SetHandler/AddHandler support was > added for proxy:unix:/ ... configuration? I think both are orthogonals. One can use to declare a worker whose connections will be reusable by : 1.Set/AddHandler "unix:/tmp/backend.sock|http://localhost/..." 2. RewriteRule ... [H=unix:/tmp/backend.sock|http://localhost/...] (supposedly) 3. RewriteRule ... "http://localhost/.." [P] But not by : 4. RewriteRule ... "unix:/tmp/backend.sock|http://localhost/..." [P] Yes 1. and 2. are two nice/efficient "shortcut" alternatives. But I find 3. vs 4. quite confusing, proxying via RewriteRule is often used (and even very useful thanks to RewriteCond decision), so we should either document on that, or fix it. I also find the idea of having an optional function between mod_proxy (provider) and mod_rewrite quite useful, since there is no point in using a [P] or [H=proxy:...] rules without mod_proxy loaded. The failure to retrieve this proxy optional function could be detected at init time to raise an error if any [P] or [H=proxy:...] is configured. After re-reading this thread, I would now rather propose that this optional function be downright ap_proxy_declare_worker(). Thus the proxy worker would be automagically declared with the RewriteRule at init time, and the run time could use the available proxy_worker struct directly to do its [P] job. Maybe that's what Jim was thinking about as a "non-obvious but elegant solution" where "2 workers map onto the same one", back in February 25... Regards, Yann.