Welcome! Log In Create A New Profile

Advanced

geo whitelist для limit_conn

Aleksandr Sytar
September 19, 2012 08:02AM
Добрый день,

Решил для создания белого списка адресов к которым применяется
limit_conn использовать geo модуль, как-то так:

geo $conn_perserver {
default 32; # 32
127.0.0.0.1 -; # no limit
}

и далее:

limit_conn perip $conn_perserver;

Однако, на стадии тестирования конфига nginx рапортует:

C:\nginx>nginx.exe -t
nginx: [emerg] invalid number of connections "$conn_perip" in C:\nginx/conf/ngin
x.conf:76
nginx: configuration file C:\nginx/conf/nginx.conf test failed

C:\nginx>nginx.exe -V
nginx version: nginx/1.2.1
TLS SNI support enabled
configure arguments: --with-cc=cl --builddir=objs.msvc8 --with-debug --prefix= -
-conf-path=conf/nginx.conf --pid-path=logs/nginx.pid --http-log-path=logs/access
.log --error-log-path=logs/error.log --sbin-path=nginx.exe --http-client-body-te
mp-path=temp/client_body_temp --http-proxy-temp-path=temp/proxy_temp --http-fast
cgi-temp-path=temp/fastcgi_temp --http-scgi-temp-path=temp/scgi_temp --http-uwsg
i-temp-path=temp/uwsgi_temp --with-cc-opt=-DFD_SETSIZE=1024 --with-pcre=objs.msv
c8/lib/pcre-8.30 --with-zlib=objs.msvc8/lib/zlib-1.2.5 --with-select_module --wi
th-http_realip_module --with-http_addition_module --with-http_sub_module --with-
http_dav_module --with-http_stub_status_module --with-http_flv_module --with-htt
p_mp4_module --with-http_gzip_static_module --with-http_random_index_module --wi
th-http_secure_link_module --with-mail --with-openssl=objs.msvc8/lib/openssl-1.0
.1c --with-openssl-opt=enable-tlsext --with-http_ssl_module --with-mail_ssl_modu
le --with-ipv6

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

geo whitelist для limit_conn

Aleksandr Sytar September 19, 2012 08:02AM

Re: geo whitelist для limit_conn

Maxim Dounin September 19, 2012 09:30AM

Re: geo whitelist для limit_conn

Aleksandr Sytar September 20, 2012 03:36AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 317
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready