This is documentation for an outdated product. See the current documentation

ISPmanager 5 Business Documentation

Logs rotation


General information

By default for logs rotation, ISPmanager 5 uses the logrotate utility.

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

logrotate starts 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/

#The first line is a template of log-files. 
/var/www/httpd-logs/ {
        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/ #Analyze logs
/var/www/httpd-logs/ {
        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 today) Example: if you need to rotate logs only for , the command will look like /usr/sbin/logrotate -f /etc/logrotate.d/web/

Possible problems

  • the 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: Awstats

Once logs analyzer for the web domain 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/" #location of log for analysis
SiteDomain="" #site for analysis
DirData="/var/www/user/data/www/" #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/ -update

When statistics collection starts

  • If the period is set to "during rotation", the analyzer will start by logrotate.

The directive prerotate that starts the log analyzer will be added into the configuration file /etc/logrotate.d/web/<>

/var/www/httpd-logs/ { 	
olddir /var/www/username/data/logs 	
rotate 10 	
/var/www/httpd-logs/ { 	
olddir /var/www/username/data/logs 	
rotate 10
  • If the period is set to "every hour", the statistics collection script will be added into user cron
    # crontab -u username -l
    #ISPmanager log rotate
    0 * *	/etc/webanalyzer.d/username/

Possible issues with statistics collection

  • Statistics show only one unique visitor.

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

  • Statistics show zero

Make sure that the following line in the AWStats configuration file for the domain (/etc/awstats/ 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/ .


See also: the official documentation Awstats