Incorrect IP Address Deducted by Nginx version: nginx/1.2.1

Bozhidara Marinchovska quintessence at bulinfo.net
Wed Feb 19 22:29:22 UTC 2014


Hello,

Your FastCGI params are wrong.

It should be as I wrote previously:
fastcgi_param REMOTE_ADDR $http_x_real_ip;

In your  fastcgi_params file
remove:
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param HTTP_X_REAL_IP $http_x_real_ip;

and add on their place only:
fastcgi_param REMOTE_ADDR $http_x_real_ip;

Also you may place proxy_set_headers outside location, for example in 
server section

server
{
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
some other ...

     location ...{
     ...
     include fastcgi_params;
     }
}


On 2/19/2014 7:18 PM, sivakr wrote:

> fastcgi_param	REMOTE_ADDR		$remote_addr;
> fastcgi_param   HTTP_X_REAL_IP          $http_x_real_ip;
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx



More information about the nginx mailing list