1 (edited by xda 2011-08-06 23:42:54)

Topic: set_real_ip_from | real_ip_header

Hi,

I am using a firewall that uses nginx as a proxy. Now since I am also using your plugin on a cPanel it means that I got two reversed proxies. With cpnginx being applied on same server were website is hosted.

Now my question is, can I add the following code:
http://wiki.nginx.org/NginxHttpRealIpMo … al_ip_from

Because my firewall will forward the real IP of clients. Now, nginxcp forwards real IP from client to Apache. But since it cannot read the real IP from firewall I have issues with a couple of websites. Turning off the firewall/shield is not a option.

Now I guess I have to add:
set_real_ip_from   $firewall_ip1;
set_real_ip_from   $firewall_ip2;
real_ip_header     X-Real-IP

But this requires of course that nginx is compiled with this module. Any way to enable it in nginxcp?

Regards,
Raz

Re: set_real_ip_from | real_ip_header

please search this forum there is a url for manual nginix compilation for  cpnginx and danginx

Syslint Technologies | 24x7 Server Management | Outsourced Support | Software Development - (0091) 471-3273-211

Re: set_real_ip_from | real_ip_header

Some times you may need to set it as follows,

real_ip_header     X-Forwarded-For;

Syslint Technologies | 24x7 Server Management | Outsourced Support | Software Development - (0091) 471-3273-211

Re: set_real_ip_from | real_ip_header

You  may also edit  /usr/local/apache/conf/mod_rpaf.conf with the following

RPAFheader X-Real-IP
RPAFheader X-Forwarded-For

Syslint Technologies | 24x7 Server Management | Outsourced Support | Software Development - (0091) 471-3273-211