public inbox for gentoo-server@lists.gentoo.org
 help / color / mirror / Atom feed
From: peter.gantner@stud.uni-graz.at
To: gentoo-server@lists.gentoo.org
Subject: Re: [gentoo-server] Apache2 logs
Date: Mon, 8 Aug 2005 22:58:24 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.63.0508082245430.9667@scourge.crownest.net> (raw)
In-Reply-To: <42F7C1D5.5030601@bellsouth.net>

> Sean Wells wrote:
>> What is the right way to clean apache2 logs?

Quoth david (on Monday, the 8th of August):
>> I use logrotate to loop through the logs daily...I generally only keep a
>> weeks worth or so due to size.  It'll automatically remove the old ones just
>> fine in the end.

> Thanks looks like what I need, This is just my server here at the house
> for my stuff, do I need to edit anything?
> # packages can drop log rotation information into this directory
> include /etc/logrotate.d
>
> notifempty
> nomail
> noolddir

As always, the man page to logrotate provides helpful hints. Also, the 
default conf file.

interesting options in logrotate include
compress # gzips old logs
keep N	# keeps N <periods> of logs
where <periods> can be specified with daily|weekly|monthly

also, the "postrotate" option, which lets you specify an action/script 
to execute just after logs have been rotated, like e.g.:

postrotate
apache2ctl graceful
endscript


In Gentoo, the apache package drops a useful default file to 
/etc/logrotate.d/apache2

HINT: when playing with logrotate and the compress option, and using 
app-admin/sysklogd, be aware of the things in 
/etc/cron.daily/syslog.cron: most of the logfiles created by syslog will 
be rotated by this script, so don't include them in your logrotate 
setup!

Greets,
 	Peter G.
-- 
"I do not think the way you think I think."
     -- Kai, last of the Brunnen G
-- 
gentoo-server@gentoo.org mailing list



  parent reply	other threads:[~2005-08-08 21:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-08 20:01 [gentoo-server] david
2005-08-08 20:18 ` [gentoo-server] Sean Wells
2005-08-08 20:34   ` [gentoo-server] Apache2 logs david
2005-08-08 20:48     ` david
2005-08-08 20:59       ` Sean Wells
2005-08-08 21:27         ` david
2005-08-09  7:03           ` Ow Mun Heng
2005-08-08 20:58     ` peter.gantner [this message]
2005-08-20  5:43     ` A. Khattri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.63.0508082245430.9667@scourge.crownest.net \
    --to=peter.gantner@stud.uni-graz.at \
    --cc=gentoo-server@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox