Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 43625 invoked from network); 12 Nov 2007 01:08:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Nov 2007 01:08:42 -0000 Received: (qmail 2634 invoked by uid 500); 12 Nov 2007 01:08:20 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 2614 invoked by uid 500); 12 Nov 2007 01:08:20 -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 2598 invoked by uid 99); 12 Nov 2007 01:08:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Nov 2007 17:08:20 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jslive@gmail.com designates 64.233.166.178 as permitted sender) Received: from [64.233.166.178] (HELO py-out-1112.google.com) (64.233.166.178) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Nov 2007 01:08:22 +0000 Received: by py-out-1112.google.com with SMTP id u52so1437424pyb for ; Sun, 11 Nov 2007 17:08:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=/Vv5MA0/Tj0jffqPI2TlXKi2huZzvv6JLu6ER3HFEII=; b=uC7C+fwrwhTm99yRwQDIuYfxIahJFT8bgJo9osmC+pDzaGH8xLx6apbS1NPgKisMvJZkVNVMvIaYjfcsQEQtvIZidoWJJUPuIh/rCuK3HMdNcHK6A/W9rcQNQ7ZhirehLykH4ZJ8t6tX6xtYpi/Rm1yq9mop88Ihl/nMTH/081s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=eVa6H7ElaThizk+NdBVMG82AFud3A42t9rLa6Ude/7QZguKdvQt1iExQ/gUvpf/0XLLakhUFW7McKt11/wPg1aO3qIuEoVH26Ilr6aGRIhtkaPTfg2xvZjHwKGCWIluAUa+S9PLxBBixAXpJ8AX271ZNP0mU5Lr6bXoUNX97ToE= Received: by 10.65.43.5 with SMTP id v5mr12509064qbj.1194829679672; Sun, 11 Nov 2007 17:07:59 -0800 (PST) Received: by 10.65.243.10 with HTTP; Sun, 11 Nov 2007 17:07:59 -0800 (PST) Message-ID: Date: Sun, 11 Nov 2007 20:07:59 -0500 From: "Joshua Slive" Sender: jslive@gmail.com To: users@httpd.apache.org In-Reply-To: <4737A1C0.7020506@crackpot.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20071107114834.vawzvbzf608o44kg@secure.crackpot.org> <47373A34.5000400@crackpot.org> <4737A1C0.7020506@crackpot.org> X-Google-Sender-Auth: e606c84b5b3ec810 X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] logging php usage and directory index pages On Nov 11, 2007 7:43 PM, Alex Dean wrote: > >>> 2. Can I log the actual file that was served, even for directory indexes? > >>> > >>> I've tried the '%f' log format, and for http://site.com requests, I get > >>> a log of '/var/www/site.com/htdocs/'. If the directory index file was > >>> 'index.html', I'd like '/var/www/site.com/htdocs/index.html' to get into > >>> the log somehow. > > > > I don't believe that is possible. There are many ways that a request > > can get mapped to a file, so there is no way for apache to determine > > definitively what has happened. You can take a look at the different > > available environment variables (using a printenv cgi script) and try > > turning RewriteEnging On, which sets a few extra variables. > > But one way or another Apache has to actually read a file off the disk > (or cache) and send it to the client. Apache doesn't expose that > through logging directives? > > It's exactly because there are so many ways that a file can be accessed > (DirectoryIndex, Rewrite rules, etc) that I'm looking for a better > answer than just the URL that was requested. One problem here is that these is really no such thing as "an" apache. Apache is a modular server that can be configured to access files in dozens of different ways depending on the modules loaded. It would be theoretically possible to develop an API for all these modules to report back exactly where they grabbed a file (but such an API doesn't currently exist). But then you have the additional problem that the question "What file was retrieved from disk?" doesn't necessarily have a clear answer. Responses can easily mix several files, with some included as-is, others having filters applied, etc. I would agree, however, that it would be nice if it was possible to know exactly what file was served when the serving is done by apache's core handler. There may indeed be a way to do this, but if it isn't in the list of available environment variables, then I don't know what it is. Joshua. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org