Plesk for Linux
kb: technical
ABT: Group B
Applicable to:
- Plesk for Linux
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:
CONFIG_TEXT: LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
-
Add the "%a" parameter to display the client IP address:
CONFIG_TEXT: 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
Comments
0 comments
Please sign in to leave a comment.