Apache logs are not rotated in cpanel

use this code to rotate the apache logs in /etc/httpd/logs/ The logs in /etc/httpd/domlogs are rotated according to setting in WHM -> Tweak settings

CODE:
  1. /etc/httpd/logs/*log {
  2. missingok
  3. notifempty
  4. sharedscripts
  5. compress
  6. postrotate
  7. /bin/kill -HUP `cat /usr/local/apache/logs/httpd.pid 2>/dev/null` 2> /dev/null || true
  8. endscript
  9. }

Leave a Reply

You must be logged in to post a comment.