• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Plesk 11.0.9 with Nginx does conflict with other programs

igraf

Regular Pleskian
Hello
I have problems with activated nginx
In wordpress plugins use the IP address for the spam analysis.

Comments with Nginx be classified as spam (same IP address).
All comments contain the IP address of the Plesk server, instead. The local IP address of the router (DSL providers).


The following php settings are displayed

PHP-Info
with Nginx
SERVER_ADDR = SERVER IP
REMOTE_ADDR = SERVER IP

without Nginx
SERVER_ADDR = SERVER IP
REMOTE_ADDR = LOCAL DSL PROVIDER IP

It's not just Wordpress affected but also other programs!
Temporary solution: turn off nginx

Problem exists since 13 October 2012
Presumably "Plesk Update 18 or 19"

CentOS 5.8 (Final)
Panel-Version 11.0.9 Update #20, Build110120608.16
Linux version 2.6.18-308.16.1.el5
 
Last edited:
Hello.

Have same problem

Plesk 11.0.9 Update#20
Apache rpaf include settings with ip 127.0.0.1

remote_addr in php show server ip
 
REMOTE_ADDR = SERVER IP

That is how a proxy works ..Remember Nginx is a proxy of Apache, and php scripts are executed by apache with requests from Nginx (a local server).

Though if am not mistaken, Plesk was to rectify this in one of those MU updates ..will find out details later ...
 
That is how proxies work ..am not sure there is fix yet at the moment. Though Igor can confirm that too
 
Studied the problem in more detail (CentOS 6.3) and that he had found:

/etc/httpd/conf.d/rpaf.conf
looks like this:

LoadModule rpaf_module modules/mod_rpaf.so
<IfModule mod_rpaf-2.0.c>
RPAFenable On
RPAFsethostname On
RPAFproxy_ips 127.0.0.1
RPAFheader X-Forwarded-For
</IfModule>

With these settings, there is the problem that is described in the topic above "remote_addr in php show server ip"

If I instead of 127.0.0.1 pointing out the IP of my server (and then reboot Apache), the issue shall be resolved, the IP addresses are transferred without problems.
===
Why rpaf does not want to work with 127.0.0.1?
 
I once again want to ask developers to pay attention to this problem.
The problem has since Microupdate#19

File downloading PSA_11.0.9/microupdates/MU19/common/Apache.php: 46%..58%..100% was finished.
File downloading PSA_11.0.9/microupdates/MU19/common/WebProxyManager.php: 67%..100% was finished.
File downloading PSA_11.0.9/microupdates/MU19/common/nginx.php: 100% was finished.
File downloading PSA_11.0.9/microupdates/MU19/common/nginxDomainForwarding.php: 100% was finished.
File downloading PSA_11.0.9/microupdates/MU19/common/nginxDomainVhost.php: 100% was finished.
File downloading PSA_11.0.9/microupdates/MU19/common/nginxDomainVirtualHost.php: 100% was finished.
File downloading PSA_11.0.9/microupdates/MU19/common/nginxForwarding.php: 100% was finished.

The problem described in this topic appear on the same occasion:
http://forum.parallels.com/showthread.php?t=263045

Apache [remote_addr] show own server ip
 
Last edited:
Applied Microupdate#22 but the problem remains.
Details are described in the 1-st post.
Apache [remote_addr] show own server ip

Have to keep Nginx switched off :(
How to fix?
 
Thanks for the reply.
I will describe the problem in detail ...
---
The problem is that if Nginx on, Apache [remote_addr] does not show client IP, instead shows its own (server IP).
The problem arose after the Microupdate # 19 before that everything worked fine.

I tested it on dedicated server with CentOS 6.3x64 and openSUSE 12.1x64, PLESK 11.0.9 Microupdate#22
---
How to reproduce:
1) CentOS 6.3x64 minimal OR openSUSE 12.1x64 minimal with all updates at this time.
2) PLESK 11.0.9 with all Microupdates up to #22 with Nginx ON
3) IPv4 address (one shared address)
4) Create any domain
5) 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...

[SERVER_ADDR] as expected, shows the server IP address
[REMOTE_ADDR] must show the address of the client, but instead it shows the server address.

Because of the disturbed many PHP scripts that actively use $_SERVER['REMOTE_ADDR']
 
Last edited:
It´s the same problem like mine (http://forum.parallels.com/showthread.php?p=645831)

How to reproduce:
the same way like AlkatraZ described but other OS
1) Ubuntu 12.04.1 LTS
2) PLESK 11.0.9 with all Microupdates up to #22 with Nginx ON
3) IPv4 address (one shared address)
4) Create any domain
5) Put it in a Domain Document Root simple index.php file:
Quote:
<?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...

same result as AlkatraZ
 
Thanks, but please use template. I have submitted request #122302 to developers:

---------------------------------------------------------------
PRODUCT, VERSION, MICROUPDATE, OPERATING SYSTEM, ARCHITECTURE
Ubuntu 12.04.1 LTS, CentOS 6.3x64 and openSUSE 12.1x64, PLESK 11.0.9 Microupdate#22

PROBLEM DESCRIPTION
The problem is that if Nginx on, Apache [remote_addr] does not show client IP, instead shows its own (server IP).
The problem arose after the Microupdate # 19 before that everything worked fine.

STEPS TO REPRODUCE
1) CentOS 6.3x64 minimal OR openSUSE 12.1x64 minimal with all updates at this time.
2) PLESK 11.0.9 with all Microupdates up to #22 with Nginx ON
3) IPv4 address (one shared address)
4) Create any domain
5) 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
--------------------------------------------------------------

I will update thread with results as soon as I receive them.
 
Developers can't reproduce this issue. Need additional information:

# export DOMAIN=domain.com; zip -r domain.info.zip `grep HTTPD_VHOSTS_D /etc/psa/psa.conf | awk '{print $2}'`/$DOMAIN/{conf,statistics}/{last*,logs/*log} /usr/local/psa/admin/conf/templates/{default,custom}

Where DOMAIN=poblem domain

Please attach domain.info.zip
 
Where DOMAIN=poblem domain
If Nginx ON, problematic are all domains.
I now specifically temporarily switched ON Nginx, so you can see the results: http://batumboutique.com
As You can see, [REMOTE_ADDR] displays the address of the server, not the client.
---
According to Your instructions, I attach the file.
On the server is installed openSUSE 12.1x64, however, on CentOS 6.3x64 had the same problem.
 

Attachments

  • domain.info.zip
    32.4 KB · Views: 1
Last edited:
PHornburg, thank you. We have reproduced this issue. It caused by implementation proxy_pass http://<IP>:7080
instead of proxy_pass http://127.0.0.1:7080
in MU19 without modification for RPAF module.

As temporary fix you can modify file:

# vi `grep HTTPD_INCLUDE_D /etc/psa/psa.conf | awk '{print $2}'`/rpaf.conf

and modify record for 127.0.0.1

RPAFproxy_ips 127.0.0.1

to include all server's IP separated by space, for example:

RPAFproxy_ips 127.0.0.1 192.168.10.10 192.168.10.11
 
yes

in my case rpaf wasnt configured at all. Theres is no rpaf.conf anywhere.

i added


<IfModule mod_rpaf-2.0.c>
RPAFenable On
RPAFsethostname On
RPAFproxy_ips YOUR IP (NOT 127.0.0.1 !)
RPAFheader X-Forwarded-For
</IfModule>

in new conf file in every /var/www/vhost/YOURDOMAIN/conf

As Alkatraz said.
works.
thanks everyone ...

ubuntu 12.04 Plesk11.09
 
Guys, this workaround is not compatible with latest http://kb.parallels.com/115102 - Parallels Plesk Panel 11.0.9 MU#24 but issue is fixed there.
I suggest you revert back this workaround and install MU#24 after that.
 
Back
Top