From owner-freebsd-questions@FreeBSD.ORG Sat Jan 15 11:43:31 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3245B16A4CE for ; Sat, 15 Jan 2005 11:43:31 +0000 (GMT) Received: from t-x.dignus.nl (t-x.dignus.nl [83.219.88.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA4D743D45 for ; Sat, 15 Jan 2005 11:43:30 +0000 (GMT) (envelope-from colin@kenmore.kozy-kabin.nl) Received: from localhost (localhost.dignus.nl [127.0.0.1]) by t-x.dignus.nl (Safehouse) with ESMTP id 1EEFF2841F for ; Sat, 15 Jan 2005 12:43:46 +0100 (CET) Received: from kenmore.kozy-kabin.nl (cjr-home [62.251.72.148]) by t-x.dignus.nl (Safehouse) with ESMTP id 067F12841E for ; Sat, 15 Jan 2005 12:43:43 +0100 (CET) Received: from kenmore.kozy-kabin.nl (localhost.kozy-kabin.nl [127.0.0.1]) by kenmore.kozy-kabin.nl (Postfix) with ESMTP id 4BFCF6230 for ; Sat, 15 Jan 2005 12:43:26 +0100 (CET) Received: from localhost (colin@localhost)j0FBhQUH070817 for ; Sat, 15 Jan 2005 12:43:26 +0100 (CET) (envelope-from colin@kenmore.kozy-kabin.nl) Date: Sat, 15 Jan 2005 12:43:26 +0100 From: "Colin J. Raven" To: FreeBSD Questions In-Reply-To: <20050115115307.D802@kenmore.kozy-kabin.nl> Message-ID: <20050115123833.E802@kenmore.kozy-kabin.nl> References: <20050115115307.D802@kenmore.kozy-kabin.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by RemSPAMd at ph230.plushosting.nl Subject: Re: Apache2 Conditional Logging help [Followup] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jan 2005 11:43:31 -0000 On Jan 15 at 12:26, I said: > I'm trying to supress logging of such things as favicon.ico, gifs and > jpegs. In a home server environment (right now anyway) I just don't > think it's necessary to log serving of those items. > > Accordingly, some googling seemed to point me towards doing something > like this: > ######################################## > SetEnvIf Request_URI "\.gif$" dontlog > SetEnvIf Request_URI "\.jpg$" dontlog > SetEnvIf Request_URI "\.jpeg$" dontlog > > But this doesn't work - at all. Images are still being logged > My images are in /path/to/web_data/images, so perhaps that has something > to do with it. I can't figure out the syntax to accomplish calling the > path proerly though. Various kinds of fiddling with the syntax and > restarting httpd hasn't worked. > > Part of the problem is that apachectl configtest doesn't complain about > syntax no matter how I fiddle with any of these. It just reports "Syntax > OK" and when I restart there are no logfile errors. > FOLLOWUP I found this gem at: http://httpd.apache.org/docs-2.0/env.html#examples SetEnvIf Request_URI \.gif image-request SetEnvIf Request_URI \.jpg image-request SetEnvIf Request_URI \.png image-request CustomLog /var/log/httpd-access.log combined env=!image-request Restarted httpd and no more images (of the kind described above anyway) were logged. Still outstanding is the other task of conditionally logging attempted exploits, (but not the output) and confirming URL-rewriting is working as per my other post this morning. Regards to all, -Colin