Re: apache logging problems

Joshua Andrews <[email protected]>
Newsgroups gmane.linux.redhat.fedora.legacy
Message-ID <[email protected]>
Eric Rostetter wrote:
>
> Apache isn't seeing that the files have been rotated, and is still
> writing to the old files.
>
> Fix your logrotate scripts.  Probably need a postrotate line to
> restart apache, maybe even some other options.... Maybe something
> like:
>
> /var/log/httpd/*log {
>     missingok
>     notifempty
>     sharedscripts
>     compress
>     delaycompress
>     postrotate
>         /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> 
> /dev/null || true    endscript
> }
>
> The "compress" and "delaycompress" are optional (i.e. only if you want 
> the
> logs compressed).
>
> Of course, instead of kill -HUP you could use /etc/init.d/httpd or
> /usr/sbin/apachectl directly to restart the web server...
Thanks,

The httpd logrotate script was much as you wrote it out but there are so 
many entries because of the virtualhost logging that I have consolidated 
them all into one expression;

/var/log/httpd/access_log /var/log/httpd/any_log etc... {
missingok
postrotate
/bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
endscript
}

I am thinking that restarting httpd so many times as I had logs may be 
the problem.

Thank you for the response, it helps getting another view.
-Joshua

--
fedora-legacy-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/fedora-legacy-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.