hello. I have a similar problem
I'm using a recognition function to IP. My server works with nginx, fast-cgi, php5, in which there are multiple virtual servers.
function ip give me the ip of the virtual server ip: 10.10.10.1 and not the client.
I think the problem is that is not properly configured fast-cgi:
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
but really do not know
anyone can help??
greattings