Incorrect IP Address Deducted by Nginx version: nginx/1.2.1

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


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
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

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

More information about the nginx mailing list