ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ngx_http_geo_module range overlaps


  • To: nginx-ru@xxxxxxxxx
  • Subject: ngx_http_geo_module range overlaps
  • From: Ксения Юрьевна Блащук <ksyblast@xxxxxxxxx>
  • Date: Sat, 4 Jan 2014 15:01:16 +0300
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=H/bQ5rFeKU1zA5p5AAreWmM365mSGWOWDI2B+SnAjJc=; b=Ijey6cdbCJKBhtf6G5Ez9R1TYXyxLSgc9rwGsAmSyJtsUBUKvEQ4knQoIUDLqOMOiH g3B0nFOIv/7efD5QlM8Q5QeiPT0gJAzmtCPdX9q+NkA1imFucRNtOgDqxIurl2CK6ybs PiSdD7Hsai7MWRcyvzjv+y5sBb714Q2RorYLBdIRyATqhxomObn7ln/Qg6QOmddnDQE0 qyQYwFKLIeML1vrT4lzWgM4EqbXacA9areU95OHkvKvvY2pZNQnKpZwRXuBvg4XaACxO Y6lUx+EMrgEf+Ot+oymShq6Tcu4TAo/J6qT9vpOEZmaNZtikC2dDLsYhSRg9s2QmpNTr onVg==

Добрый день.
Возник вопрос по модулю 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@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.