Search Engine: Elastic

Article ID: 128794, created on May 4, 2016, last review on May 4, 2016

  • Applies to:
  • Plesk Automation 11.5


Overall information:

There are two applications supplied with Plesk Automation to build statistics files and display web statistics for domains: AWstats and Webalizer. The statistics are built from web server log files which are stored in directories individual to every website.

On Apache web servers the log files are stored in directories like below:


The system directories such as /var/www/vhosts/system/ are used to keep the following domain-related items:

  • the virtual host configuration files
  • the custom php.ini file
  • log files for the domain
  • generated web statistics pages

every domain and subdomain on a webspace has its own system directory.

The directories such as /var/www/vhosts/ keep websites content, log directory (with hard links to the files in the /var/www/vhosts/system/ directory), custom error pages, files for chroot environment (if any) and so on.

On IIS web servers the log files are stored in directories like below:


where 'x' is a some number. Unlike to Apache, all domains and subdomains on a webspace has their log files stored in the directory like C:\inetpub\vhosts\\logs\ in folders named W3SVCx separate for ever domain/subdomain.

Web statistics files are kept in directories like below:


Log files processing

When the Daily MaintenanceTask is running the subtask ExecuteStatistics rotates web server log files and creates temporary log files which are used for statistics calculation.

On Apache servers:

  • Content of the log file access_log is appended to the file access_log.processed
  • Entries for the current date are copied to the access_log.webstat file

On IIS servers:

  • A file with the name like web20160504124359626.log containing recent entries is created from the primary log file named u_extend1.log for every domain in its log directory

Statistics pages generation

Statistics pages are generated by sheduled daily tasks in cron on Apache nodes and Windows Task Scheduler on IIS nodes.

On Apache nodes:

The daily task /etc/cron.daily/50plesk-webstat runs the utility web_statistic_executor which parses log files access_log.webstat and generates web statistics pages.

The pathes to the web statistics apps are defined in the /etc/psa/psa.conf file on the service node:

# grep STAT /etc/psa/psa.conf
WEB_STAT /usr/bin/webalizer
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

Domain configuration files for AWstats are located in the /usr/local/psa/etc/awstats/.

Domain configuration files for Webalizer are located in directories like /var/www/vhosts/system/

After the web_statistic_executor utility finishes processing access_log.webstat it cleans the log file.

On IIS nodes:

The pathes to the web statistics apps are defined in the following Windows Registry keys:

HKLM\SOFTWARE\Wow6432Node\PLESK\PSA Config\Config\AWStatsPath
HKLM\SOFTWARE\Wow6432Node\PLESK\PSA Config\Config\WebalizerPath

They have the below values:

AWStatsPath = C:\Program Files (x86)\Parallels\Plesk\Additional\AWStats\
WebalizerPath = C:\Program Files (x86)\Parallels\Plesk\Additional\Webalizer\bin\webalizer.exe

The daily task Plesk Scheduler Task #{9b734460-76dc-44ce-8ead-f2a6f19a707e} in the Windows Task Scheduler runs the utility C:\Program Files (x86)\Parallels\Plesk\admin\bin\web_statistics_executor.exe which generates statistics web pages and then deletes temporary log files such as web20160504124359626.log.

The domain name and web statistics application are specified in the C:\inetpub\vhosts\\logs\W3SVCx\web_stat_executor.conf file.

After the statistics is generated, a Windows Registry key HKLM\SOFTWARE\Wow6432Node\PLESK\PSA Config\Config\Statistics\DomainIds\221\LastHttpStatisticsRun (where 221 - is the domain ID in the PSA database) is updated to the current date and time.

33a70544d00d562bbc5b17762c4ed2b3 caea8340e2d186a540518d08602aa065 e0aff7830fa22f92062ee4db78133079

Email subscription for changes to this article
Save as PDF