• 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

PLESK 11.5 Nginx IP problem

AlkatraZ

Basic Pleskian
PRODUCT, VERSION, MICROUPDATE, OPERATING SYSTEM, ARCHITECTURE
Parallels Plesk Panel v11.5.29_build115130607.20 os_Ubuntu 12.04

PROBLEM DESCRIPTION
The problem is that if Nginx on, Apache [remote_addr] does not show client IP, instead shows its own (server IP).

STEPS TO REPRODUCE
1) Create any domain
2) Put it in a Domain Document Root simple index.php file:

<?php
echo '<pre>';
print_r($_SERVER);
echo '</pre>';

6) Go from the browser to the address of the domain and see the values of the displayed variables...

ACTUAL RESULT
[REMOTE_ADDR] must show the address of the client, but instead it shows the server address.

EXPECTED RESULT
[SERVER_ADDR] as expected, shows the server IP address
[REMOTE_ADDR] must show the address of the client
Because of the disturbed many PHP scripts that actively use $_SERVER['REMOTE_ADDR']

ANY ADDITIONAL INFORMATION
The same problem was on PLESK 11.09 but then the developers have corrected.
http://forum.parallels.com/showthre...ther-programs&highlight=$_SERVER['REMOTE_ADDR
 
Sorry, but Plesk 11.5 is not officially released yet. Work on the final version is still ongoing. Let's wait for the official release.
 
You will have to install and configure mod_rpaf apache module http://stderr.net/apache/rpaf/ and forward the client ip to apache.

In nginx set clients IP $remote_addr as header variable X-Real-IP

proxy_pass http://xx.xx.xx.xx:8880;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

Now in apache configuration set X-Real-IP( clients original IP) as remote IP address

LoadModule rpaf_module modules/mod_rpaf-2.0.so

RPAFenable on
RPAFsethostname Off
RPAFproxy_ips xx.xx.xx.xx

RPAFheader X-Real-IP
 
Sorry, but Plesk 11.5 is not officially released yet. Work on the final version is still ongoing. Let's wait for the official release.
Dear Igor, let me disagree with You.
1) Version 11.5.x is a menu to choose an installer, which you can download from the official website.
2) In the Main menu of the control panel is invited to update to 11.5.29
So the question about the bug IP addresses relevant :)
 

Attachments

  • plesk.jpg
    plesk.jpg
    135 KB · Views: 20
Try removing any custom web server templates and reconfiguring web servers (# plesk sbin httpdmng --reconfigure-all).

If this doesn't help, dig into mod_rpaf direction (though it is usually properly configured by Plesk).

Alternatively provide Parallels staff with credentials to your machine for investigation.
 
I have the same Problem on Nginx

I have the same problem, solved it by modifying the PLESK automatically generated when the domain configuration.

Try to edit the nginx domains

/ etc / nginx / plesk.conf.d / vhosts / youdomain.conf <- all files

and change the following line by IP which is assigned the domain:

This:
* location / {
* PROXY_PASS http://127.0.0.1:7080;

new:
* location / {
* PROXY_PASS http://xxxx:7080; <- the IP of the domain


If you modify the domain from the control panel will generate a new file and you will lose your changes.
 
Please disregard my previous comment.

Solution: install libapache2-mod-rpaf from raring release (Ubuntu 13.04).

Reason: libapache2-mod-rpaf package in Ubuntu 12.04 is outdated and buggy.


Thanks for report :)
 
Last edited:
Oh, I almost forgot. Silly me :)

You will need to downgrade this package before next Plesk update. Otherwise you risk breaking the upgrade.

Alternatively keep old libapache2-mod-rpaf package but replace just the module (.so file) from the newer package. That way you'll avoid any problems on upgrade.
 
Back
Top