Welcome! Log In Create A New Profile

Advanced

Re: GEOIP context problem

Maxim Dounin
August 31, 2010 05:42AM
Hello!

On Tue, Aug 31, 2010 at 12:18:13AM -0400, syle wrote:

> There is a problem with current 0.8.x release of GEOIP although I assume
> it has always not worked, where these variables:
> fastcgi_param GEOIP_CITY_COUNTRY_CODE $geoip_city_country_code;
> fastcgi_param GEOIP_CITY_COUNTRY_CODE3 $geoip_city_country_code3;
> fastcgi_param GEOIP_CITY_COUNTRY_NAME $geoip_city_country_name;
> fastcgi_param GEOIP_REGION $geoip_region;
> fastcgi_param GEOIP_CITY $geoip_city;
> fastcgi_param GEOIP_POSTAL_CODE $geoip_postal_code;
> fastcgi_param GEOIP_CITY_CONTINENT_CODE $geoip_city_continent_code;
> fastcgi_param GEOIP_LATITUDE $geoip_latitude;
> fastcgi_param GEOIP_LONGITUDE $geoip_longitude;
>
> do not work except inside the fastcgi_params file. The context is
> suppose to work within http as per module documentation however setting
> these variables
> within http context ends up not setting them at all.

Most likely you attempted to do something like

http {
fastcgi_param ...
...
server {
...
location ... {
fastcgi_param ...
...
}
}
}

This won't work due to inheritance rules for array-type
directives, see here:

http://wiki.nginx.org/NginxHttpFcgiModule#fastcgi_param

"Directives set in current level clear any previously defined
directives for the current level."

You have to define all fastcgi_param directives at the same level,
i.e.

location ... {
fastcgi_param ...
fastcgi_param ...
...
}

or

http {
fastcgi_param ...
fastcgi_param ...
...
}

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

GEOIP context problem

syle August 31, 2010 12:18AM

Re: GEOIP context problem

Sergey A. Osokin August 31, 2010 03:42AM

Re: GEOIP context problem

Maxim Dounin August 31, 2010 05:42AM

Re: GEOIP context problem

syle August 31, 2010 10:58AM

Re: GEOIP context problem

syle August 31, 2010 11:38AM

Re: GEOIP context problem

Maxim Dounin August 31, 2010 11:46AM

Re: GEOIP context problem

Maxim Dounin August 31, 2010 11:56AM

Re: GEOIP context problem

syle August 31, 2010 10:25PM

Re: GEOIP context problem

syle August 31, 2010 10:43PM

Re: GEOIP context problem

adamchal October 21, 2010 05:50PM

Re: GEOIP context problem

Sergey A. Osokin September 01, 2010 02:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 293
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready