Hi all,
Whenever I do a logrotate, it seems my apache2 stops logging though
there are new log files created but with 0 size. I'm using syslog-ng if
it matters.
If I manually do a /etc/init.d/apache2 restart the logging resumes.
What can I do?
I had this problem. I think the problem is that Apache logs to an inode rather than a filename, so when the files moves apache loses it and can't log to it any more. Or something like that. I'm not sure really, but the solution is to add this line to your apache logrotate config file:
copytruncate
This tells logrotate to make a copy of the file then then just truncate the original, so the file that apache is logging to never goes away. This is instead of its usual behaviour of moving the file and touching a new one. Works like a charm for me.
Hope this helps.
--
Russ.
-- [email protected] mailing list
