Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Web access_log question




On Aug 7, 2006, at 11:23 AM, Nigel Kersten wrote:


On 07/08/2006, at 8:06 AM, David Muszynski wrote:

So if the log file's name changes then webalizer.conf breaks.
Is there a way to make sure that I'm okay as is, or does anyone have any
suggestions on what I should do differently?

I find the default log rolling behaviour of Apache to be really annoying, and I always install cronolog.


http://www.cronolog.org

It lets you do things like this:

ErrorLog "|/opt/local/sbin/cronolog /Volumes/Web/logs/sitea/%Y/%Y-% m-sitea_error_log"
CustomLog "|/opt/local/sbin/cronolog /Volumes/Web/logs/sitea/%Y/%Y-% m-sitea_access_log" combined


so you then get logs that are in folders by year and named by year and month.

I find this works really well combined with awstats, which I prefer to Webalizer, as you can tell awstats to look for logs with a similar (but different) syntax.

LogFile="/Volumes/Web/logs/sitea/%YYYY-2/%YYYY-2-%MM-2- sitea_access_log"

The "-2" bits for awstats represent that date two hours ago, so it happily copes with situations where your log is rolling over to a new month.


According to the rotatelogs man file:

OPTIONS
logfile
The path plus basename of the logfile. If logfile includes any
% characters, it is treated as a format string for strftime(3).
Otherwise, the suffix .nnnn is automatically added and is the
time at which the logfile was created.



This ought to work:

CustomLog '|/usr/sbin/rotatelogs "/var/log/httpd/ts/%D.access_log" 1296000' "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""

It gets written properly but even after restarting Apache, no log file gets created does it need to be escaped somehow?

Thanks,
David


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macos-x-server/email@hidden

This email sent to email@hidden

References: 
 >Web access_log question (From: "David Muszynski" <email@hidden>)
 >Re: Web access_log question (From: Nigel Kersten <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.