Welcome! Log In Create A New Profile

Advanced

ngx_http_geo_module range overlaps

Ксения Юрьевна Блащук
January 04, 2014 07:02AM
Добрый день.
Возник вопрос по модулю ngx_http_geo_module. Почему-то нельзя внести
пересекающиеся диапазоны адресов. В документации:

A value of the most specific match is used. For example, for the 127.0.0.1
address the value "RU" will be chosen, not "US".

Example with ranges:

geo $country {
ranges;
default ZZ;
127.0.0.0-127.0.0.0 US;
127.0.0.1-127.0.0.1 RU;
127.0.0.1-127.0.0.255 US;
10.1.0.0-10.1.255.255 RU;
192.168.1.0-192.168.1.255 UK;
}

Пытаюсь воспроизвести этот пример:

/etc/init.d/nginx reload
* Checking nginx' configuration ...
nginx: [emerg] range "127.0.0.1-127.0.0.255" overlaps "127.0.0.1-127.0.0.1"
in /etc/nginx/sites/test-geo.conf:6
nginx: configuration file /etc/nginx/nginx.conf test failed
nginx: [emerg] range "127.0.0.1-127.0.0.255" overlaps "127.0.0.1-127.0.0.1"
in /etc/nginx/sites/test-geo.conf:6
nginx: configuration file /etc/nginx/nginx.conf test failed

/etc/nginx/sites/test-geo.conf:
geo $country {
ranges;
default ZZ;
127.0.0.0-127.0.0.0 US;
127.0.0.1-127.0.0.1 RU;
127.0.0.1-127.0.0.255 US;
10.1.0.0-10.1.255.255 RU;
192.168.1.0-192.168.1.255 UK;
}

nginx -V
nginx version: nginx/1.4.4
configure arguments: --prefix=/usr --conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error_log --pid-path=/run/nginx.pid
--lock-path=/run/lock/nginx.lock --with-cc-opt=-I/usr/include
--with-ld-opt=-L/usr/lib --http-log-path=/var/log/nginx/access_log
--http-client-body-temp-path=//var/lib/nginx/tmp/client
--http-proxy-temp-path=//var/lib/nginx/tmp/proxy
--http-fastcgi-temp-path=//var/lib/nginx/tmp/fastcgi
--http-scgi-temp-path=//var/lib/nginx/tmp/scgi
--http-uwsgi-temp-path=//var/lib/nginx/tmp/uwsgi --with-file-aio
--with-aio_module --with-pcre --with-pcre-jit
--without-http_empty_gif_module --without-http_fastcgi_module
--without-http_map_module --without-http_memcached_module
--without-http_scgi_module --without-http_split_clients_module
--without-http_uwsgi_module --with-http_addition_module
--with-http_image_filter_module --with-http_mp4_module
--with-http_realip_module --with-http_secure_link_module
--with-http_stub_status_module
--add-module=/var/tmp/portage/www-servers/nginx-1.4.4/work/headers-more-nginx-module-0.22
--add-module=/var/tmp/portage/www-servers/nginx-1.4.4/work/ngx-fancyindex-0.3.2
--without-mail_imap_module --without-mail_pop3_module
--without-mail_smtp_module --user=nginx --group=nginx

Gentoo Base System release 2.2
uname -a
Linux 3.0.78 #1 SMP Mon May 20 15:17:58 FET 2013 x86_64 Intel(R) Xeon(R)
CPU E5310 @ 1.60GHz GenuineIntel GNU/Linux


В чем может быть дело?
Спасибо.
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

ngx_http_geo_module range overlaps

Ксения Юрьевна Блащук January 04, 2014 07:02AM

Re: ngx_http_geo_module range overlaps

Ксения Юрьевна Блащук January 05, 2014 08:14AM

Re: ngx_http_geo_module range overlaps

Maxim Dounin January 05, 2014 08:24AM

Re: ngx_http_geo_module range overlaps

Валентин Бартенев January 05, 2014 08:20AM

Re: ngx_http_geo_module range overlaps

Igor Sysoev January 05, 2014 08:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 138
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