Disk space occupied by the archives is included in the user quota. Learn more under Disk quotas.
To view the log go to Web-server settings → WWW-logs.
To view the reports go to Domains → WWW-domains → Website management → Statistics. Statistics for a WWW-domains is kept in /var/www//data/www//webstat.
Rotation is used to archive the logs so that they occupy less disk space. logrotate is a utility that is used for log rotation. The cron job /etc/cron.daily/logrotate starts the utility every day.
The rotation global settings are kept in the configuration file /etc/logrotate.conf.
Logrotate configuration file
Rotation parameters of WWW-domains are kept in the configuration files /etc/logrotate.d/web/. E.g.:
olddir— the directory with archived logs.rotate — the number of archives that will be kept.size — the maximum size of the file to trigger rotation.copytruncate — make a log copy and then reset it. The log file won't be deleted.compress — file compression file. gzip is used by default. : daily, weekly, monthly./etc/webanalyzer.d// — log analyzer option before rotation.
Run the rotation manually
Execute the command:
/usr/sbin/logrotate -d-f<path to the logrotate configuration file of a WWW-domain>
Execute the following command to start rotation for all WWW-domains:
/usr/sbin/logrotate -f /etc/logrotate.conf
The result may be the error "log does not need rotating" meaning that the rotation operation failed as it was already made that day. To run the rotation change the status of the last rotation for the WWW-domain in the file /var/lib/logrotate/logrotate.status.
Logs analyzer Awstats
Awstats configuration file
Enabling the log analyzer for a WWW-domain creates the configuration file in /etc/awstats/awstats..conf. The main parameters:
LogFile — path to the log;
SiteDomain — the WWW-domain being analyzed;
DirData — path to the directory with results.
Automatic statistics collection
If you have selected "during rotation" in the Period field the analyzer will start with the logrotate utility. The following strings will be added to the configuration file /etc/logrotate.d/web/:
To delete the error log, enter Web-server Settings → WWW logs → select the log → press Clear → OK.
Deleting the query log from the control panel interface is not supported. This is to ensure that logs are rotated correctly. If you need to delete the query log for a domain, run the following command on the server with ISPmanager: