Why is for each virtual host logfiles are duplicated?

Created:

2016-11-16 12:47:22 UTC

Modified:

2017-04-24 12:11:43 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Why is for each virtual host logfiles are duplicated?

Applicable to:

  • Plesk 11.0 for Linux
  • Plesk 12.0 for Linux

Question

Why is for each virtual host logfiles are duplicated? For instance for domain example.com :

# ls -la /var/www/vhosts/example.com/logs/
access_log
access_ssl_log
error_log

# ls -la /var/www/vhosts/system/example.com/logs
access_log
access_ssl_log
error_log

Answer

Directories /var/www/vhosts/domain.tld/logs and /var/www/vhosts/system/domain.tld/logs are hardlinked to each other. Hardlinked files share same inodes:

# ls -i  /var/www/vhosts/domain.tld/logs/
14696902 access_log 14696930 access_log.processed 14696717 access_log.stat 14696478 error_log

# ls -i /var/www/vhosts/system/domain.tld/logs/
14696902 access_log 14696930 access_log.processed 14696717 access_log.stat 14696478 error_log

So there are no duplicate log files created by Plesk. Also, you can ensure that only one log instance is created by web server in /etc/httpd/conf/plesk.conf.d/vhosts/domain.tld.conf in CustomLog and ErrorLog directives values.

Have more questions? Submit a request
Please sign in to leave a comment.