• 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

Bug in Apache 2.4 centos 7 mod_remoteip ?

moswak

Regular Pleskian
Hi @ all,

i have a fresh install
centos7
12.5.30 Update #20
apache 2.4.6-40.el7.centos
nginx 1.9.4-centos7.15091112

in /var/log/httpd/access_log the serverIP is written instead of client IP

"but" in logs for domains its "ok" client ip is written.

control:
/etc/httpd/conf/plesk.conf.d/server.conf

<IfModule mod_remoteip.c>
RemoteIPInternalProxy ..serverIP..
RemoteIPHeader X-Forwarded-For
</IfModule>

seems ok

using google i found "Apache2 2.4+ not logging remote IP address using mod_remoteip"
(https://trick77.com/apache2-2-4-logging-remote-ip-address-using-mod_remoteip/)

in /etc/httpd/conf/httpd.conf

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

change to

LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

fixed the issue.

Is this normal with apache 2.4.6-40.el7.centos ? a bug ?
 
Last edited:
Back
Top