public inbox for gentoo-server@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sean Wells" <sean@datamosaics.com>
To: <gentoo-server@lists.gentoo.org>
Subject: RE: [gentoo-server] Apache2 logs
Date: Mon, 8 Aug 2005 13:59:54 -0700	[thread overview]
Message-ID: <200508082053.j78Kric7021900@robin.gentoo.org> (raw)
In-Reply-To: <42F7C52E.3000408@bellsouth.net>

I have the following options turned on in mine:

create
compress
notifempty
nomail
noolddir
/var/log/apache2/*_log {
daily
rotate 7
sharedscripts
postrotate
/etc/init.d/apache2 reload >/dev/null # this makes sure apache doesn't
continue writing to the old logs
endscript
}

Sean Wells
Network Administrator
Data Mosaics, Inc.
2406 S. Dishman Mica Rd.  Suite 6
Spokane Valley, WA  99206
866.904.DMSF (phone)
509.928.4236 (fax)

-----Original Message-----
From: david [mailto:abbottdavid@bellsouth.net] 
Sent: Monday, August 08, 2005 1:49 PM
To: gentoo-server@lists.gentoo.org
Subject: Re: [gentoo-server] Apache2 logs

david wrote:

>Sean Wells wrote:
>
>  
>
>>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.
>>
>>Sean Wells
>>Network Administrator
>>Data Mosaics, Inc.
>>2406 S. Dishman Mica Rd.  Suite 6
>>Spokane Valley, WA  99206
>>866.904.DMSF (phone)
>>509.928.4236 (fax)
>>-----Original Message-----
>>From: david [mailto:abbottdavid@bellsouth.net] 
>>Sent: Monday, August 08, 2005 1:01 PM
>>To: gentoo-server@lists.gentoo.org
>>Subject: [gentoo-server]
>>
>>What is the right way to clean apache2 logs?
>>/var/log/apache2/access_log and error_log point to
>>/usr/lib/apache2/logs/access_log and error_log
>>I have been cd /usr/lib/apache2/logs
>>rm access_log
>>touch access_log
>>chmod 666 access_log same for error_log
>>I could leave error_log alone because its not very big, I do it to
>>access_log because it is huge and webalizer complains.
>>Should root own these logs or apache?
>> 
>>
>>    
>>
>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
>  
>

>Looks like I need to add this /etc/logrotate.conf after compress;
>
compress
"/var/log/apache2/access_log" /var/log/apache2/error_log {
rotate 5
size 100k
sharescripts
postrotate
    /bin/killall -HUP apache2
endscript
}
Is that right?

> 
>  
>

-- 
gentoo-server@gentoo.org mailing list

-- 
gentoo-server@gentoo.org mailing list



  reply	other threads:[~2005-08-08 20:55 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 [this message]
2005-08-08 21:27         ` david
2005-08-09  7:03           ` Ow Mun Heng
2005-08-08 20:58     ` peter.gantner
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=200508082053.j78Kric7021900@robin.gentoo.org \
    --to=sean@datamosaics.com \
    --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