getting ip address from fastcgi for Wordpress plugin

toddlahman nginx-forum at
Tue Mar 29 15:04:25 MSD 2011

With my current configuration below the IP address is not appearing
properly in Wordpress.

In the fastcgi.conf I have:

fastcgi_param  REMOTE_ADDR        $remote_addr;

In the nginx.conf I have:

upstream php {

location ~ \.php$ {
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                include fastcgi.conf;
                fastcgi_intercept_errors off;
                fastcgi_pass php;

cgi.fix_pathinfo = 0; in php.ini

With this I got a blank page when submitting a comment.

I tried adding

				fastcgi_pass_header Host;
				fastcgi_pass_header X-Real-IP;
				fastcgi_pass_header X-Forwarded-For;

Now I get 502 Bad Gateway (Nginx).

What am I missing?

Posted at Nginx Forum:,186497,186583#msg-186583

More information about the nginx mailing list