Symptoms
-
- The
.webstat
logs in/var/www/vhosts/example.com/logs
directory are growing big (several GB) - Manual statistics recalculation returns errors:
# plesk sbin statistics --calculate-one --domain-name=example.com
WARN: WARNING during statistics_collector execution: statistics_collector[32568]: Log rotation `/usr/local/psa/logrotate/sbin/logrotate /usr/local/psa/etc/logrotate.conf -s /usr/local/psa/var/logrotate.status' failed with code 1.
Stdout:
Stderr:error: error creating output file /var/www/vhosts/system/example.com/logs/access_ssl_log.processed.1: File exists
- The
Cause
Incorrect AWstats paths are set in the /etc/psa/psa.conf
file. For example:
# grep AWSTATS /etc/psa/psa.conf
AWSTATS_ETC_D /etc/awstats
AWSTATS_BIN_D /usr/share/awstats/wwwroot/cgi-bin
AWSTATS_TOOLS_D /usr/share/awstats/tools
AWSTATS_DOC_D /var/www/html/awstats
Resolution
Set the correct paths in the configuration file as follows:
- Connect to the server via ssh
- Open
/etc/psa/psa.conf
file with a text editor - Reset all
AWSTATS
paths in this file to their default values:# grep AWSTATS /etc/psa/psa.conf
AWSTATS_ETC_D /etc/awstats
AWSTATS_BIN_D /var/www/cgi-bin/awstats
AWSTATS_TOOLS_D /usr/share/awstats
AWSTATS_DOC_D /var/www/html/awstats