Symptoms
-
Client IP address is not shown in the global Apache logfile when nginx is used as a proxy web-server.
-
The Apache module “mod_remoteip” is enabled:
# apachectl -M | grep remoteip
remoteip_module (shared)
Cause
Combined logs format is not configured.
Resolution
-
Connect to the Plesk server via SSH.
-
Open the file /etc/httpd/conf/httpd.conf in a text editor and navigate to the following line:
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
-
Add the “%a” parameter to display the client IP address:
LogFormat "%a %h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
-
Save the changes and close the file.
-
Reload Apache configuration:
# service httpd reload