Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
geo whitelist для limit_conn
- To: nginx-ru@xxxxxxxxx
- Subject: geo whitelist для limit_conn
- From: Aleksandr Sytar <sytar.alex@xxxxxxxxx>
- Date: Wed, 19 Sep 2012 16:01:18 +0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=DK89lfZUfyplE1e8cnIjIxQ6JD81IV5ecRVpCPlAaBE=; b=p1GJWboiDU6NRKOU6zlQvHnpPvn6kwfWE9RQGh3fOdskJbTGzG5D1iu4j6ZV/lXAj0 VA25J5mxKSfj3ALHOTjbjlNvPxJOYSQG7Ag0sNO8sIWm/rn08614KxUGKLvT4l6vA24p yKjK/pRkJJChoE3WUemSFMm2Yu2lO0RHStr/95RGAv/Wq+7hm83VuRhJOvZs8GCIPsfS Y8p+TTiWi2OVeTjBjSOTzngvpWnHDbDifsHTQoiRIeiUhQbYP7Ld4cG6N0H/V1PPx7kW uOKkZwVFFFd38MBDIQhiunfUQDymBdzrquS4NyrDPM1DNxZedORvVeqKg6gl/iKl6Yum egDQ==
Добрый день,
Решил для создания белого списка адресов к которым применяется
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@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru
|