From: LostInTheLoop on
Hi,

logrotate rotates /var/log/httpd/access_log and
/var/log/httpd/ssl_request_log. Everithing works fine for
access_log, but apache goes on writing on the old ssl_request_log,
now renamed with ".1". The new ssl_request_log remains empty.

This is /etc/logrotate.d/httpd:

/var/log/httpd/*_log {
postrotate
/etc/rc.d/rc.httpd graceful-stop
/etc/rc.d/rc.httpd start
endscript
}

Any idea? TIA
From: John K. Herreshoff on
LostInTheLoop wrote:

> Hi,
>
> logrotate rotates /var/log/httpd/access_log and
> /var/log/httpd/ssl_request_log. Everithing works fine for
> access_log, but apache goes on writing on the old ssl_request_log,
> now renamed with ".1". The new ssl_request_log remains empty.
>
> This is /etc/logrotate.d/httpd:
>
> /var/log/httpd/*_log {
> postrotate
> /etc/rc.d/rc.httpd graceful-stop
> /etc/rc.d/rc.httpd start
> endscript
> }
>
> Any idea? TIA

Sure! Add this line in there somewhere: rotate 5

At a terminal, type man logrotate.

HTH.

John.

--
Using the jch_box.
From: LostInTheLoop on
John K. Herreshoff, on 07/05/2010 06:23 PM, wrote:

> Sure! Add this line in there somewhere: rotate 5

I already have
rotate 4
in /etc/logrotate.conf, and have 4 rotated files for each and every
log except /var/log/httpd/ssl_request_log.

> At a terminal, type man logrotate.

Done before bothering the newsgroup. Doesn't explain the different
behavior of /var log/httpd/access_log and
/var/log/httpd/ssl_request_log.

Thanks
From: LostInTheLoop on
LostInTheLoop, on 07/06/2010 09:58 AM, wrote:
> John K. Herreshoff, on 07/05/2010 06:23 PM, wrote:
>
>> Sure! Add this line in there somewhere: rotate 5
>
> I already have rotate 4 in /etc/logrotate.conf, and have 4
> rotated files for each and every log except
> /var/log/httpd/ssl_request_log.

Could it be apache's fault? After all, logrotate does rotate
ssl_request_log and create a new empty file. It's apache that after
the rotation starts logging on ssl_request_log.1 leaving the new
file empty.
From: Helmut Hullen on
Hallo, LostInTheLoop,

Du meintest am 06.07.10:

>> I already have rotate 4 in /etc/logrotate.conf, and have 4
>> rotated files for each and every log except
>> /var/log/httpd/ssl_request_log.

> Could it be apache's fault? After all, logrotate does rotate
> ssl_request_log and create a new empty file. It's apache that after
> the rotation starts logging on ssl_request_log.1 leaving the new
> file empty.

Just stop and restart the apache. Maybe apache wasn't told clearly that
"logrotate" should have done more than only renaming the logging target.

Viele Gruesse
Helmut

"Ubuntu" - an African word, meaning "Slackware is too hard for me".

 |  Next  |  Last
Pages: 1 2
Prev: Re (2): What am I doing wrong ?
Next: MySQL version