In Progress ZC-9660 - Apache HTTPS access logs cannot correctly logged to ssl_log file after NGINX installed

cPanel & WHM Version
100.0.7

yeelok

Member
Nov 26, 2019
8
1
3
Hong Kong
cPanel Access Level
Root Administrator
Hello,

I recently installed NGINX reserve proxy on my server, and found that both Apache HTTP&HTTPS access are logged to the same file:
Code:
/var/log/apache2/domlogs/<DOMAIN>
I then manually change sslport argument in http.conf from port 444 to port 443, ie:
Code:
CustomLog "|/usr/local/cpanel/bin/splitlogs --dir=/etc/apache2/logs/domlogs --main=<DOMAIN> --mainout=/etc/apache2/logs/access_log --sslport=444" combinedvhost
Code:
CustomLog "|/usr/local/cpanel/bin/splitlogs --dir=/etc/apache2/logs/domlogs --main=<DOMAIN> --mainout=/etc/apache2/logs/access_log --sslport=443" combinedvhost
After Apache restarts, the HTTPS access logs now can correctly log to
Code:
/var/log/apache2/domlogs/<DOMAIN>-ssl_log
It looks like HTTPS requests still treated as using 443 port even the Apache is listen HTTPS on 444
 

cPDan

cPanel Staff
Staff member
Mar 9, 2004
724
15
243
When NGINX is proxying to Apache Apache does not log, only NGINX does. It does that to avoid double logging (image everyone’s bandwidth usage, visitors, and errors doubling all of a sudden ).

Hitting Apache directly will get logged by Apache however.
 
  • Like
Reactions: cPRex