Logs rotation

How logs rotation works

By default for logs rotation ISPmanager 5 uses the logrotate utility that can be installed in ISPmanager --- Settings--- Software

You need to activate rotation for each web-domain in its edit form. Click "Show hidden fields" for flexible configuration of logs rotation.


logrotate is started every day in /etc/cron.daily/logrotate . The configuration file is located in


Logs rotation settings for each web-domain are located in


By default the following logs settings are active (contents of /etc/logrotate.d/web/domain.com)

#The first line is a template of log-files. 
/var/www/httpd-logs/domain.com.access.log {
        olddir /var/www/user/data/logs #Locate archived files into specified directory
        copytruncate #Create a copy of the original log-file and then reset it. Thus the file won't be deleted. 
        compress #Archive files (gzip is used by default)
        monthly #Rotate once a day/week/month
        prerotate #Similar to postrotate, but the operations will be performed before archiving
                /etc/webanalyzer.d/user/domain.com #Analyze logs
/var/www/httpd-logs/domain.com.error.log {
        olddir /var/www/user/data/logs


Start rotation manually

/usr/sbin/logrotate -d -f <path_to_config_of_required_web_domain>

-d - detailed information -f - rotate in any case (for example, even if logs were rotated totay) Example: if you need to rotate logs only for domain.com , the command will look like

/usr/sbin/logrotate -d -f /etc/logrotate.d/web/domain.com

Possible problems

  • log does not need rotating

Cause - logs have already been rotated. You can modify status in the file


Or delete this file, but you will have to start rotation for all logs again

/usr/sbin/logrotate -f /etc/logrotate.conf

Logs on control panels v5 are rotated by the built-in mechanism once their size reaches 100 MB

Logs analyzer

ISPmanager 5 supports:

  • awstats
  • webalizer

To install a log analyzer, go to ISPmanager --- Settings--- Software.

You need to activate analyzer for each web-domain in its edit form. Click "Show hidden fields" for flexible configuration of logs rotation.


Example with Awstats

Once logs analyzer for the web domain domain.com is activated, the configuration file with rules will be created. Normally it is located in


The followings are specified in the file

LogFile="/var/www/httpd-logs/dasha.com.access.log" #location of log for analysis
SiteDomain="dasha.com" #site for analysis
DirData="/var/www/user/data/www/dasha.com/webstat/" #location of statistics after analysis
and others. 

You can view statistics per web-domain in ISPmanager --- Web domains--- select a required domain --- click "Statistics".

Execute the following command for collecting statistics manually



/usr/bin/perl /usr/lib/cgi-bin/awstats.pl -update -config=domain.com

Possible problems with statistics collection

  • Statistics shows only one unique visitor.

This may happen in case Nginx + Apache are installed. Solution - install mod_rpaf for Apache.

  • All zeros in statistics.

Make sure that the following line in the awstats configuration file for the domain (/etc/awstats/awstats.domain.com.conf) is specified


You also make sure log format is combined in the Apache configuration file

CustomLog /var/www/httpd-logs/domain.access.log combined
  • How to exclude my IP address from statistics?

Edit the configuration file /etc/awstats/awstats.domain.com.conf .


Was this answer helpful?

 Print this Article

Also Read

Dovecot configuration files

Details of the dovecot Following is the example of Dovecot on Debian. You can see the lines that...

List of users

This module can be used to manage your user accounts. You may add new users, edit their...


The Alpha version of a control panel is the first phase to begin software testing. It...

Installation of ISPsystem software products from repository

ISPsystem's software products can be installed and updated using OS in-built tools, i.e. using OS...

Backups in ISPmanager 5

Data collection Before starting a backup process, data from the control panel's modules that...