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 AB4B19022 for ; Sat, 7 Jul 2012 15:47:31 +0000 (UTC) Received: (qmail 44767 invoked by uid 500); 7 Jul 2012 15:47:28 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 44745 invoked by uid 500); 7 Jul 2012 15:47:28 -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 44735 invoked by uid 99); 7 Jul 2012 15:47:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Jul 2012 15:47: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 (athena.apache.org: domain of covener@gmail.com designates 209.85.217.173 as permitted sender) Received: from [209.85.217.173] (HELO mail-lb0-f173.google.com) (209.85.217.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Jul 2012 15:47:23 +0000 Received: by lbok6 with SMTP id k6so19594296lbo.18 for ; Sat, 07 Jul 2012 08:47:02 -0700 (PDT) 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=Qs1Dv5lFGCw6BvTIJml2+8c9vLDJ21frKGcYVoflWSs=; b=AIrnU4ofJlPvEWtZVIlPYyeuHNV2/mJqqGonCZP5szGD2fBLSw2e3GmPCxRjekSdGE +582IxvpYgyeXY/YV/Gk8WAGETEiixHsSrYIhTr/Avf4A/xN2AMtlA5u3tzXsvuahch1 4DwCihLoQeEJ13nRVPZbOOHPyMI7ZAhWOeWKFj4H6FVg2/IDyYJurYxlP93ugpcEKV62 cS4mzYI9gPd39zihrBZCXpV5dEPEwdKtOOo+FUsE3IADA10XODo1IyjQjqp0NarJlVAM xgTqBzZa2eHA9IxozHQjyfw7Lf3l9EY2zAqihe7zSxHZPO1+5VGx+ExNi1hBRcaniEHY PUdA== MIME-Version: 1.0 Received: by 10.112.43.135 with SMTP id w7mr15573744lbl.48.1341676022052; Sat, 07 Jul 2012 08:47:02 -0700 (PDT) Received: by 10.112.1.35 with HTTP; Sat, 7 Jul 2012 08:47:02 -0700 (PDT) In-Reply-To: <4FF835D5.30005@primary.net> References: <4FF835D5.30005@primary.net> Date: Sat, 7 Jul 2012 11:47:02 -0400 Message-ID: From: Eric Covener To: users@httpd.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Restricting an Apache Module (Handler) to a Virtual Host On Sat, Jul 7, 2012 at 9:12 AM, Daniel Ruggeri wrote: > On 7/6/2012 2:44 PM, Andrew wrote: >> I have written an Apache Module that performs an internal redirect >> (ap_internal_redirect) based on certain conditions. Then mod_proxy >> handles proxying the request to a backend server. I'm using the >> ap_hook_post_read_request hook with APR_HOOK_MIDDLE. I would like to >> restrict this handler to a single virtual host but currently it is >> invoked on all virtual host requests (there are many). The httpd.conf >> configuration is limited to theLoadModule directive. I've tried using >> SetHandler handlername in the vhost and SetHandler None in the main >> config but the handler is still invoked on requests to other vhosts. If you care about the handler, you have to check it yourself in your module and return DECLINED if it's not tagged for you. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org