Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Проблема с geoip_module
- To: nginx-ru <nginx-ru@xxxxxxxxx>
- Subject: Проблема с geoip_module
- From: dimkalinux <dimkalinux@xxxxxxxxx>
- Date: Thu, 30 Dec 2010 14:13:56 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=8Fdt1frsclB1xF1NhRu16hmh3D0fbP1F2ZD+QMLpXIU=; b=v+p7Md/b7NwZArs6XzwlzbfHSqot8od22IPl6V/Gk9eUkRd33my+uVBIt1nLlBmGf2 tg9YafaAp4PWVp8aqQvlJClVLEkQbpQ8Eib+TYSsIvlfdsbu+HWXGFGbjl2iTZwnz8a8 noUIJ3PvaPkf2sFQOTg7J6I1TO6Uq+gl9Ca3E=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; b=LnBW+Va9X+bHvVvrD8urQWZxMwidRol0NXA1nNoEQF5d4Sl2pv7Rn6oRNsdEnE8pqP 3P5PBYxSKCJXw7tyiYnb+/wSVhFnCISjJzi53ZvMn7foQoKd9Bu8YUHedyi5gr09lSk5 g0yS//tdde02RY7xrgASldnjhK83x6lIVP390=
Подключил в nginx.conf maxmind geoip в .dat формате
http {
....
geoip_country /etc/nginx/GeoIP.dat;
geoip_city /etc/nginx/GeoLiteCity.dat;
include *.conf.
}
Потом в подключаемом conf в
server {
...
location / {
proxy_pass http://127.0.0.1:8080/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-GEO $geo;
proxy_set_header X-GEO-CITY $geoip_city;
proxy_set_header Range "";
proxy_connect_timeout 320;
proxy_send_timeout 320;
proxy_read_timeout 320;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
}
на сервере в apache_headers() есть всё, кроме X-GEO-CITY. Если
X-GEO-CITY выставить в 1 - приходит и он.
В чём может быть проблема?
nginx version: nginx/0.8.54
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
configure arguments: --user=nginx --group=nginx
--prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--http-log-path=/var/log/nginx/access.log
--http-client-body-temp-path=/var/lib/nginx/tmp/client_body
--http-proxy-temp-path=/var/lib/nginx/tmp/proxy
--http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi
--pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx
--without-http_charset_module --without-http_userid_module
--without-http_fastcgi_module --without-http_memcached_module
--with-http_realip_module --with-http_gzip_static_module
--with-http_stub_status_module --with-http_geoip_module
--with-http_flv_module --with-file-aio
--add-module=/usr/src/redhat/SOURCES/masterzen-nginx-upload-progress-module-c740674
--add-module=/usr/src/redhat/SOURCES/nginx_upload_module-2.0.12
--with-cc-opt='-O2 -g -m32 -march=i386 -mtune=generic
-fasynchronous-unwind-tables'
--
dimka-linux,
Jabber: dimkalinux@xxxxxxxxx
Public key: 8B5EDD83
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|