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:
-
/etc/httpd/logs/*log {
-
missingok
-
notifempty
-
sharedscripts
-
compress
-
postrotate
-
/bin/kill -HUP `cat /usr/local/apache/logs/httpd.pid 2>/dev/null` 2> /dev/null || true
-
endscript
-
}