Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Mar 2007 12:54:59 -0500
From:      "David Robillard" <david.robillard@gmail.com>
To:        peter@placidpublishing.net
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Apache Rotate Logs and Log Rotate.
Message-ID:  <226ae0c60703020954n7068e7eele9f8f7d875a1767@mail.gmail.com>
In-Reply-To: <45E7A83C.5090704@placidpublishing.net>
References:  <226ae0c60702151024u6c71d50bn72d54631c33ed32@mail.gmail.com> <45D4DF88.1020009@placidpublishing.net> <226ae0c60702151454x4b32e698hb89b51005b6938e@mail.gmail.com> <45D5FD5B.6030605@placidpublishing.net> <226ae0c60702161146i6ce6b54ayab9e279c9cf28d1@mail.gmail.com> <45E53C8F.8090100@placidpublishing.net> <226ae0c60702280813q288f646bt8fb8fca886716ee4@mail.gmail.com> <45E5FBE1.3030207@placidpublishing.net> <226ae0c60702281513o918561eo54f8eaf906d6a096@mail.gmail.com> <45E7A83C.5090704@placidpublishing.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 3/1/07, Peter Pluta <peter@placidpublishing.net> wrote:
> What I did was made a new log format to include the %v (it includes the
> vhost name in the logs). Lowered my error log to just info. I also got
> rid of the errorlog and customlog in my vhost brackets and setup
> newsyslog to rotate the http-access.log and  http-error.log after 24
> hours. This is what I pretty much wanted. I have more space in /home/
> now since there are no log files in there and I also have 1 main log
> that I can rotate and view or separate if needed. It makes it a lot easier.
>
> I have a quick question though. Say I am hosting a few sites for
> customers and they want to run their own statistics programs that rely
> on log files. How would I deal with the logs if they were in each users
> home directory? Those logs add up after a week or so; not to mention if
> someone had a larger site that generated larger logs. What exactly could
> be done in that situation to allow stats and still have a functional web
> server?

Hi Peter,

What I do with stats is use webalizer which is available from the
ports directory as www/webalizer.
Webalizer keeps the history of your logs, so you don't have to keep
the old ones around. I run webalizer from cron once and a while to
generate stats. I've wraped it in a simple shell script to check all
my virtual sites listed in a custom config file in /usr/local/etc and
dump the stats file into /path/to/virtual/host/stats. I then setup a
/stats Alias in httpd.conf for each virtual site and protect it with a
simple .htpasswd. Easy.

BTW, may I suggest you also include the freebsd-questions list in Cc
when you write back? Some people might be interested by what we're
talking about. In fact, ideally we should only 'talk' via the list,
but that's ok with me.

Cheers,

David
-- 
David Robillard
UNIX systems administrator & Oracle DBA
CISSP, RHCE & Sun Certified Security Administrator
Montreal: +1 514 966 0122



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?226ae0c60703020954n7068e7eele9f8f7d875a1767>