[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Customizing httpd access logs
- Subject: Re: [cobalt-users] Customizing httpd access logs
- From: "Jonathan Michaelson" <michaelsonjd@xxxxxxxxxxx>
- Date: Wed Apr 4 05:49:09 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
Mike,
> On a different Linux distribution, the httpd access logs were separated by
> domain. Each virtual domain has it's own access-log and I could set up
> logrotate to handle each log differently.
>
> The Cobalt Raq3i machines that I have all have a combined access log. I'd
> like to adjust how logrotate handles log for individual domains, but I
can't
> since the log is combined.
>
> My goal is to have the logs for a single domain rotate daily instead of by
> size (1M as it is now). Then I'd like it to compress and mail the log to
an
> e-mail address I specify.
>
> I've got everything figured out how to do this, but I can't split the log.
>
> Is there a way to change the httpd.conf so that it doesn't combine the
logs?
There is a routine that already does this on the RaQ3 and RaQ4. If you look
in /etc/logrotate.d/apache you can see that logrotate daily runs
/usr/local/sbin/split_logs web < /var/log/httpd/access to split the combined
log for each domain. These logs, stored in /home/sites/siteNNN/logs/web.log
are then rotated as configured in /etc/logrotate.d/siteNNN
If you want to change this behaviour, you just have to modify the files in
logrotate.d to rotate at a larger size, or remove that and have them rotate
at a specified interval, "man logrotate" will help you with this.
Regards,
Jonathan Michaelson
Commercial CGI Scripting