Symptoms
-
In Plesk HTTPS web statistics is not calculated but for HTTP it is updated regularly at Domains > example.com > Web Statistics Web Statistics SSL/TLS.
-
Piped logs option is enabled in Tools & Settings > Apache Web Server.
-
After the statistics calculation for a domain, the file
access_ssl_log.webstat
is empty:# ls -l /var/www/vhosts/system/example.com/logs/access_ssl_log.webstat
-rw——-. 2 root root 0 Jun 22 04:21 access_ssl_log.webstat
Cause
It is a Plesk bug with ID PPPM-8252, which is planned to be fixed in future product updates.
With Piped logs option enabled, both HTTPS and HTTP requests are logged in the file /var/www/vhosts/system/example.com/logs/access_log
instead of being separated between access_log
and access_ssl_log
. As a result, webstat data is counted as if there is only HTTP traffic on a server.
Resolution
Until the bug is fixed, Piped Logs may be disabled in Tools & Settings > Apache Web Server. In this case, all future webstat data will be counted correctly, but it will not be possible to re-calculate already generated traffic and move it from HTTP to HTTPS.
If there is a need of having Piped Logs enabled on a server use the following workaround:
-
Connect to the server using SSH.
-
Create a directory for the custom virtual hosts configuration templates:
# mkdir /usr/local/psa/admin/conf/templates/custom/
-
Copy the default template to that directory:
# cp -a /usr/local/psa/admin/conf/templates/default/server.php /usr/local/psa/admin/conf/templates/custom/
-
Open the file
/usr/local/psa/admin/conf/templates/custom/server.php
in the text editor and change the following lines:BEFORE:
<?php if ($VAR->server->webserver->apache- >pipelogEnabled): ?>
CustomLog "|<?php echo $VAR->server->productRootDir ? >/admin/sbin/pipelog <?php echo $VAR->server->webserver->httpsPort ?>" plesklog
<?php endif; ?>AFTER:
<?php if ($VAR->server->webserver->apache->pipelogEnabled): ?>
CustomLog "|<?php echo $VAR->server->productRootDir ?>/admin/sbin/pipelog 443" plesklog
<?php endif; ? -
Reconfigure the web server configuration:
# plesk repair web