Applicable to:
- Plesk for Linux
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
Additional symptoms:
- AWStats has been installed using Plesk installer
- Daily Cron task is executed on a daily basis
- No duplicate Cron tasks on the server
- Plesk might have been upgraded to Obsidian recently (Optional).
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:
-
On Debian/Ubuntu:
# 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 -
On RHEL/AlmaLinux/RockyLinux/CloudLinux:
# 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 /usr/share/awstats/wwwroot
Comments
1 comment
What about the huge log file? Specifically 'access_ssl_log.webstat', can this be deleted after correcting these paths?
Please sign in to leave a comment.