For anyone experiencing this problem in the future, I was able to use some embedded perl to parse the XFF string for the client's IP address perl_set $client_ip ' sub { my $r = shift; my $xff = $r->header_in("x-forwarded-for"); if (!$xff) { return $r->remote_addr; } else { if ($xff =~ /([0-9\.]+).*/) {by chris098 - How to...
I have a number of nginx servers running on EC2 behind Amazon's "Elastic Load Balancer". I want to find the country of the original requester. My "geo" line originally looked like this: geo $country { ... } proxy_set_header COUNTRY $country; That worked perfectly outside the load balancer, but with the load balancer, the remote_addr is just the local IP of thby chris098 - How to...