First, make sure that the apache logs in /usr/local/apache/logs/ are being rotated by logrotated. If not, you should create a file for them in /etc/logrotate.d/
Second, you can move the domlogs to a more spacious partition if you have one, e.g. /home/ and symlink back to the original location:
Kindly let me know which file i have to create in /etc/logrotate.d/ and what should write there.
Coz ThePlanet support tema told me to make some changes in etc/logrotate.conf file
here is the copy of that file
Code:
# see "man logrotate" for details
# rotate log files weekly
weekly
# keep 4 weeks worth of backlogs
rotate 4
# create new (empty) log files after rotating old ones
create
# uncomment this if you want your log files compressed
#compress
# RPM packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
monthly
minsize 1M
create 0664 root utmp
rotate 1
}
/usr/local/apache/domlogs/*.log {
missingok
rotate 3
notifempty
daily
compress
sharedscripts
postrotate
/bin/kill -HUP httpd
endscript
}
/usr/local/apache/logs/*_log {
missingok
notifempty
compress
sharedscripts
postrotate
/bin/kill -HUP httpd
endscript
}
# system-specific logs may be also be configured here.
The second half of that is fine, however you should not rotate the domlogs using logrotate otherwise it will likely break your cPanel client stats (i.e, bandwidth, awstats, analog, webalizer, etc).
The second half of that is fine, however you should not rotate the domlogs using logrotate otherwise it will likely break your cPanel client stats (i.e, bandwidth, awstats, analog, webalizer, etc).