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

  • Applies to:
  • Plesk Automation 11.5

Information

When new Apache webspace example.com is created in Plesk Automation, it has the following state:

  • Apache log files are written to the /var/www/vhosts/system/example.com/logs/ directory
  • an empty error_log file is created in the /var/www/vhosts/system/example.com/logs/ directory
  • the directory /var/www/vhosts/example.com/logs/ is empty

On the next execution of the Daily MaintenanceTask the subtask ExecuteStatisticsperforms the following actions on the log files:

  • rotates the access_log, so it becomes empty and its content is copied to the access_log.processed and access_log.webstat files
  • creates hard links for the log files in the "system" directory to the vhost's "home" directory (see the example below):

    [root@web1 ~]# ls -il /var/www/vhosts/system/example.com/logs/
    total 120
    2231839 -rw-r--r-- 2 root root 65206 May  4 15:45 access_log
    2230276 -rw-r--r-- 2 root root 44732 May  4 00:35 access_log.processed
    2230277 -rw-r--r-- 1 root root  1624 May  4 02:13 access_log.stat
    2230111 -rw-r--r-- 2 root root     0 May  4 02:15 access_log.webstat
    2231816 -rw-r--r-- 2 root root  2770 May  4 11:49 error_log
    
    [root@web1 ~]# ls -il /var/www/vhosts/example.com/logs/
    total 116
    2231839 -rw-r--r-- 2 root root 65206 May  4 15:45 access_log
    2230276 -rw-r--r-- 2 root root 44732 May  4 00:35 access_log.processed
    2230111 -rw-r--r-- 2 root root     0 May  4 02:15 access_log.webstat
    2231816 -rw-r--r-- 2 root root  2770 May  4 11:49 error_log
    

    note that the inodes in the first column are the same for the files in both directories respectively.

Note: the log files access_log.stat and access_log.webstat are used by web statistics calculation task which is executed locally and run by cron. Zero size of the file access_log.webstat means that this files was already processed by the web statistics calculation task.

Search Words

apache log files

web statistics

log files rotation

statsistics calculation

access_log missing

error_log

access_log

33a70544d00d562bbc5b17762c4ed2b3 caea8340e2d186a540518d08602aa065 e0aff7830fa22f92062ee4db78133079

Email subscription for changes to this article
Save as PDF