Welcome! Log In Create A New Profile

Advanced

Re: GEOIP context problem

Sergey A. Osokin
August 31, 2010 03:42AM
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.
>
> This is currently a major issue especially in freebsd where an upgrade
> of version from port collections can wipe out fastcgi_params file each
> time, leaving
> any webserver relying on these variables in major trouble if they were
> to forget to replace fastcgi_params file afterwards.

Could you test following patch against current version of
ports/www/nginx-devel ?

Thank you.

--
Sergey A. Osokin,
osa@FreeBSD.ORG.ru
osa@FreeBSD.ORG
Index: ports/www/nginx-devel/Makefile
===================================================================
RCS file: /home/pcvs/ports/www/nginx-devel/Makefile,v
retrieving revision 1.338
diff -u -r1.338 Makefile
--- ports/www/nginx-devel/Makefile 18 Aug 2010 09:37:34 -0000 1.338
+++ ports/www/nginx-devel/Makefile 31 Aug 2010 07:34:04 -0000
@@ -7,6 +7,7 @@

PORTNAME= nginx
PORTVERSION= 0.8.49
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://sysoev.ru/nginx/
MASTER_SITES+= ${MASTER_SITE_LOCAL}
@@ -498,10 +499,10 @@
${MKDIR} ${ETCDIR} ${NGINX_TMPDIR}
${CHOWN} ${WWWOWN}:${WWWGRP} ${NGINX_TMPDIR}
${INSTALL_PROGRAM} ${WRKSRC}/objs/nginx ${PREFIX}/sbin
-.for i in fastcgi_params koi-utf koi-win scgi_params uwsgi_params win-utf
+.for i in koi-utf koi-win win-utf
${INSTALL_DATA} ${WRKSRC}/conf/${i} ${ETCDIR}
.endfor
-.for i in mime.types nginx.conf
+.for i in fastcgi_params mime.types nginx.conf scgi_params uwsgi_params
[ -f ${ETCDIR}/${i} ] || \
${INSTALL_DATA} ${WRKSRC}/conf/${i} ${ETCDIR}
${INSTALL_DATA} ${WRKSRC}/conf/${i} ${ETCDIR}/${i}-dist
Index: ports/www/nginx-devel/pkg-plist
===================================================================
RCS file: /home/pcvs/ports/www/nginx-devel/pkg-plist,v
retrieving revision 1.14
diff -u -r1.14 pkg-plist
--- ports/www/nginx-devel/pkg-plist 14 Jul 2010 12:19:44 -0000 1.14
+++ ports/www/nginx-devel/pkg-plist 31 Aug 2010 07:34:04 -0000
@@ -1,9 +1,15 @@
@comment $FreeBSD: ports/www/nginx-devel/pkg-plist,v 1.14 2010/07/14 12:19:44 osa Exp $
+@unexec if cmp -s %D/%%ETCDIR%%/fastcgi_params-dist %D/%%ETCDIR%%/fastcgi_params; then rm -f %D/%%ETCDIR%%/fastcgi_params; fi
%%ETCDIR%%/fastcgi_params
+@exec if [ ! -f %D/%%ETCDIR%%/fastcgi_params ] ; then cp -p %D/%F %B/fastcgi_params; fi
%%ETCDIR%%/koi-utf
%%ETCDIR%%/koi-win
+@unexec if cmp -s %D/%%ETCDIR%%/scgi_params-dist %D/%%ETCDIR%%/scgi_params; then rm -f %D/%%ETCDIR%%/scgi_params; fi
%%ETCDIR%%/scgi_params
+@exec if [ ! -f %D/%%ETCDIR%%/scgi_params ] ; then cp -p %D/%F %B/scgi_params; fi
+@unexec if cmp -s %D/%%ETCDIR%%/uwsgi_params-dist %D/%%ETCDIR%%/uwsgi_params; then rm -f %D/%%ETCDIR%%/uwsgi_params; fi
%%ETCDIR%%/uwsgi_params
+@exec if [ ! -f %D/%%ETCDIR%%/uwsgi_params ] ; then cp -p %D/%F %B/uwsgi_params; fi
%%ETCDIR%%/win-utf
@unexec if cmp -s %D/%%ETCDIR%%/mime.types-dist %D/%%ETCDIR%%/mime.types; then rm -f %D/%%ETCDIR%%/mime.types; fi
%%ETCDIR%%/mime.types-dist
_______________________________________________
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: 132
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready