Код: Выделить всё
nginx -V
nginx version: nginx/1.2.1
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-file-aio --with-http_gzip_static_module --with-http_ssl_module --with-ipv6 --without-http_browser_module --without-http_geo_module --without-http_limit_req_module --without-http_limit_zone_module --without-http_memcached_module --without-http_referer_module --without-http_scgi_module --without-http_split_clients_module --with-http_stub_status_module --without-http_ssi_module --without-http_userid_module --without-http_uwsgi_module --add-module=/usr/src/nginx/source/nginx-1.2.1/debian/modules/nginx-echo
Код: Выделить всё
limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
etc/nginx/sites-available/default
добавялю в секцию server
Код: Выделить всё
location / {
limit_req zone=one burst=5;
proxy_pass http://127.0.0.1:81;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-Ip $remote_addr;
proxy_read_timeout 600;
}
Код: Выделить всё
# /etc/init.d/nginx reload
Reloading nginx configuration: nginx: [emerg] unknown directive "limit_req_zone" in /etc/nginx/nginx.conf:13
nginx: configuration file /etc/nginx/nginx.conf test failed
Код: Выделить всё
uname -r
2.6.32-5-686-bigmem
Код: Выделить всё
2012/07/15 21:46:19 [emerg] 2620#0: unknown directive "limit_req_zone" in /etc/nginx/nginx.conf:13