GEOIP context problem
Maxim Dounin
mdounin at mdounin.ru
Tue Aug 31 19:42:46 MSD 2010
Hello!
On Tue, Aug 31, 2010 at 10:58:23AM -0400, syle wrote:
> Maxim:
>
> I was doing strictly in http context as module was documented nothing
> else and it was not recogised at all ie:
>
> http {
> #GEOIP, can parse ENV headers now for where they are located :)
> geoip_city /usr/local/share/GeoIP/GeoLiteCity.dat;
>
> 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;
>
> #virtual hosting---all server {} directives
> include /usr/local/etc/nginx/vhosts/*;
> }
And you likely have "include fastcg_params;" in your locations
blocks. This is exactly what I was talked about. You have to
set all fastcgi_param's at the same level.
Maxim Dounin
More information about the nginx
mailing list