Logs directory is empty after domain creation: there are no any files in /var/www/vhosts/example.com/logs

Created:

2017-01-13 11:17:52 UTC

Modified:

2017-08-08 13:46:07 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Logs directory is empty after domain creation: there are no any files in /var/www/vhosts/example.com/logs

Symptoms

  • Log directory /var/www/vhosts/example.com/logs is empty after domain creation, but /var/www/vhosts/system/example.com/logs contain all log files
  • There are a lot of domains on the server (more than 500)
  • Apache restart interval is 0 or less than 60 seconds

Cause

Due to a large number of domains on a server, Apache configuration files for logs get created faster than the directory for logs, thus, apache gets restarted prior to /var/www/vhosts/domain/logs being created. As domain's webspace is not fully generated yet, logs do not get relinked after statistics recalculation too.

Resolution

1. Increase apache restart interval to at least 90 seconds in Plesk > Tools&Settings > Apache Web Server Settings > Apache restart interval

2. Run the following command to relink logs from /var/www/vhosts/system/example.com/logs directory:

# /usr/local/psa/admin/sbin/relink-vhost-logs --create --domain-name example.com --sys-user-login plesktest --defer 0 --webspace-name example.com

Logs will be relinked asynchronously in the background after 10 seconds.

 

 

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