Proper way to change the rotation of apache logs?
David Miller
millerdc at fusion.gat.com
Tue Oct 31 17:17:05 UTC 2006
On Oct 31, 2006, at 6:38 AM, <A.Fadyushin at it-centre.ru>
<A.Fadyushin at it-centre.ru> wrote:
>
>
>> -----Original Message-----
>> From: redhat-list-bounces at redhat.com [mailto:redhat-list-
>> bounces at redhat.com] On Behalf Of David Miller
>> Sent: Tuesday, October 31, 2006 2:47 AM
>> To: General Red Hat Linux discussion list
>> Subject: Proper way to change the rotation of apache logs?
>>
>> I would like to adjust the amount of space each apache log can take
>> up and how many copies are saved. According to RH in this kbase
> article
>> http://kbase.redhat.com/faq/FAQ_35_2798.shtm
>>
>> I want to edit the logrotate.conf file. They even have a listing in
>> the article for an httpd log file.
>>
>> ------------------------------------------
>> "/var/log/httpd/access.log" /var/log/httpd/error.log {
>> rotate 5
>> mail www at my.org
>> size=100k
>> sharedscripts
>> postrotate
>> /sbin/killall -HUP httpd
>> endscript
>> }
>> ------------------------------------------
>>
>> Is the first line a typo? It makes reference to two different files.
>> Also the log files in /var/log/httpd/ have an underscore between the
>> name and log like access_log., error_log.
>>
>
> It is possible to specify more than one file in one logrotate entry -
> the configuration will apply to all the files mentioned for that
> entry.
> If you are using Apache log file names different from those shown
> in the
> example, you should change them to the names you are using.
>
> Alexey B. Fadyushin
> Brainbench MVP for Linux
> http://www.brainbench.com
>
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
Is this the proper format below?
}
"/var/log/httpd/access_log" /var/log/httpd/access_log {
rotate 1
size=50M
sharedscripts
postrotate
/sbin/killall -HUP httpd
endscript
}
"/var/log/httpd/error_log" /var/log/httpd/error_log {
rotate 1
size=50M
sharedscripts
postrotate
/sbin/killall -HUP httpd
endscript
}
More information about the redhat-list
mailing list