<div dir="ltr">Добрый день. <br>Возник вопрос по модулю ngx_http_geo_module. Почему-то нельзя внести пересекающиеся диапазоны адресов. В документации:<br><p>
A value of the most specific match is used.
For example, for the 127.0.0.1 address the value “<code>RU</code>”
will be chosen, not “<code>US</code>”.
</p><p>
Example with ranges:
</p> <blockquote class=""><pre>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;
}
</pre></blockquote>Пытаюсь воспроизвести этот пример:<br><div><div><br>/etc/init.d/nginx reload<br> * Checking nginx' configuration ...<br>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<br>
nginx: configuration file /etc/nginx/nginx.conf test failed<br>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<br>nginx: configuration file /etc/nginx/nginx.conf test failed<br>
<br>/etc/nginx/sites/test-geo.conf:<br>geo $country {<br>    ranges;<br>    default                   ZZ;<br>    127.0.0.0-127.0.0.0       US;<br>    127.0.0.1-127.0.0.1       RU;<br>    127.0.0.1-127.0.0.255     US;<br>    10.1.0.0-10.1.255.255     RU;<br>
    192.168.1.0-192.168.1.255 UK;<br>}<br><br> nginx -V<br>nginx version: nginx/1.4.4<br>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<br>
<br>Gentoo Base System release 2.2<br> uname -a<br>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<br><br><br></div><div>В чем может быть дело?<br></div>
<div>Спасибо.<br></div></div></div>