• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

httpd logs not rotating

G

++good

Guest
I'm a plesk newbie, using 7.5.3. I have setup logrotation for all my domains (daily, keep 7, and compress) and made sure that they are enabled. However, the log files are not being rotated.

All the files in /usr/local/psa/etc/logrotate.d look like the sample below (except for the domain name). I tried running /usr/local/psa/logrotate/sbin/logrotate -d on one of the conf files, I got this error:
log /home/httpd/vhosts/domain/statistics/logs/*.processed does not exist -- skipping

Ok, the log files are /home/httpd/vhosts/domain/statistics/logs/access_log

This is the file name the domain httpd.conf file uses and plesk is the one that genereated the httpd.conf files.

I am kinda stumped. Can anyone point my in the right direction?

Thanks,
Marcus

/home/httpd/vhosts/domain/statistics/logs/*.processed {
daily
rotate 7
compress
missingok
}
/home/httpd/vhosts/domain/statistics/logs/error_log {
daily
rotate 7
compress
missingok
copytruncate
}
/home/httpd/vhosts/domain/statistics/logs/error_ssl_log {
daily
rotate 7
compress
missingok
copytruncate
}
 
Maybe try creating them?
# touch /home/httpd/vhosts/domain.com/statistics/logs/{access_log,xferlog_regular}.processed
 
Thanks for the suggestion, but it seems that now the system is only trying to rotate that empty log file.

Should my acccess log be access_log, or access_log.processed ? access_log is what plesk set the log file to, but the log rotation conf file seems to want access_log.processed

Thanks,
Marcus
 
You should have both logs. I believe when `statistics` is done, it moves the entries to the .processed log.
 
Thanks for the reply.
I guess the statistics job isn't running. Would you have any idea why that wouldn't be? I have stats setup for each domain.

Thanks,
Marcus
 
You should check your cron file for root:

bash-2.05b# grep /var/spool/cron/root -e stat
7 4 * * * /usr/local/psa/admin/sbin/statistics >/dev/null 2>&1
bash-2.05b#
 
Back
Top