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:[EMAIL PROTECTED] 
Sent: Monday, August 08, 2005 1:49 PM
To: [email protected]
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:[EMAIL PROTECTED] 
>>Sent: Monday, August 08, 2005 1:01 PM
>>To: [email protected]
>>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?

> 
>  
>

-- 
[email protected] mailing list

-- 
[email protected] mailing list

Reply via email to