• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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