• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Empty access_ssl_log with enabled pipelog and nginx

XAMeLeOH

New Pleskian
It seems like there is a problem with logging https connections through the pipelog along with enabled nginx. When the pipelog starts it retrieves the https port as an argument to parse shared access log and to separate secured and non-secured connections. By default LogFormat for access logs looks like this:
LogFormat "%v@@%p@@%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" plesklog
There is no problem until nginx is enabled. When nginx is enabled, Plesk changes apache2 http port from 80 to 7080 and https port from 443 to 7081.
Since %p means canonical port which is 443 for any secured virtual host and 80 for non-secured, pipelog receives something like this for secured connections:
somehost.example.com@@443@@127.0.0.1 - - [21/Feb/2013:18:59:56 +0700] "GET /nonexist.html HTTP/1.0" 404 1269 "-" "Wget/1.13.4 (linux-gnu)"
Pipelog assumes this is a non-secured connection, 'cause for secured connections port 7081 should be used.
The result is all access_ssl_log files are empty and access_log files contain records about both http and https connections.

As a workaround for this you should create custom template file and replace @@%p@@ with @@%{local}p@@ - which means local port instead of canonical.

Here is example of how to do this:

cd /opt/psa/admin/conf/templates
mkdir custom
cat default/server.php | sed 's/%v@@%p@@/%v@@%{local}p@@/g' > custom/server.php
 
Back
Top