Applicable to:
- Plesk Onyx for Linux
Symptoms
-
The domain's access log in Domains > example.com > Logs > Apache access (the file is
/var/www/vhosts/example.com/logs/access_log
) contains server's IP address instead of client's. -
rpaf
Apache module is shown as enabled and theremoteip
module is shown as disabled in Tools & Settings > Apache Web Server > Apache modules: -
Nginx proxy mode is enabled in Domains > example.com > Apache & nginx Settings > nginx settings.
-
In Tools & Settings > Server Components, the version of the Apache is 2.4.x:
-
PHP variable
$_SERVER['REMOTE_ADDR']
in the website code returns the IP address of the Plesk server instead of the actual IP address of the visitor.
Cause
Apache module remoteip
is disabled.
Resolution
-
Go to Tools & Settings > Apache Web Server.
-
In the section Apache modules, disable the module
rpaf
, enable the moduleremoteip
and click OK or Apply to save the changes:
-
Connect to the server using SSH.
-
Enable
remoteip
Apache module:# plesk sbin httpd_modules_ctl --enable remoteip
-
Disable
rpaf
Apache module:# plesk sbin httpd_modules_ctl --disable rpaf
-
Restart Apache:
-
In CentOS, RHEL, CloudLinux:
# service httpd restart
-
In Debian and Ubuntu:
# service apache2 restart
-
Comments
0 comments
Please sign in to leave a comment.