[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: apache logging problems



Quoting Joshua Andrews <josh wavefood com>:

now, sometimes after the Sunday 4:02 AM restart there is no more
logging (combined log or error log), for the virtual servers and I have
to stop and restart apache to get logging working again. The logs are
rotated properly and there are new files created which are writable but
no entries are made.

Apache isn't seeing that the files have been rotated, and is still
writing to the old files.

Any ideas what is going wrong?

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,
-Joshua

--
Eric Rostetter
The Department of Physics
The University of Texas at Austin

Go Longhorns!


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]