• 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

Issue Whmcs will not log user IPs and only shows localhost

EmperorFPI

New Pleskian
Server operating system version
Rocky Linux 8.8 (Green Obsidian)
Plesk version and microupdate number
Plesk Obsidian Version 18.0.56
I have tried everything I could find.

In the phpinfo file it is showing the server Name correctly but the:

$_SERVER['REMOTE_ADDR'] is showing (127.0.0.1) localhost
$_SERVER['SERVER_ADDR'] is showing (127.0.0.1) localhost

and the,
$_SERVER['HTTP_X_FORWARDED_FOR'] is showing correct IP address of the server
$_SERVER['HTTP_X_REAL_IP'] is showing the correct IP address of the server

and WHMCS logs only show the (127.0.0.1) IP for ALL logins; Admin, Client, Incognito, using VPN

Where can I look, what can I try?

Thanks for helping
 
Says they fixed it on the changelog and gives a command to update.

Doesn't seem to work though. I ran it and it showed the actual IP instead to of local in RemoteIPInternalProxy


plesk bin apache --listen-on-localhost true

grep RemoteIPInternalProxy /etc/httpd/conf/plesk.conf.d/server.conf

RemoteIPInternalProxy 127.0.0.1
 
@EmperorFPI That recent fix is only for the the correct IP address being logged in Apache. It won't fix the PHP $_SERVER vars showing 127.0.0.1. The only way to fix this now is to disable the new Apache localhost feature with:

Code:
plesk bin apache --listen-on-localhost false
 
Back
Top