Welcome! Log In Create A New Profile

Advanced

Не работает set $limit_rate и limit_conn

Андрей Василишин
December 14, 2009 04:30PM
Есть схема:
nginx1 -> nginx2 -> apache

nginx1:
> nginx -V
nginx version: nginx/0.7.64
TLS SNI support enabled
configure arguments: --conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid
--lock-path=/var/lock/nginx.lock
--http-log-path=/var/log/nginx/access.log
--http-client-body-temp-path=/var/lib/nginx/body
--http-proxy-temp-path=/var/lib/nginx/proxy
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-debug
--with-http_stub_status_module --with-http_flv_module
--with-http_ssl_module --with-http_dav_module
--with-http_gzip_static_module --with-mail --with-mail_ssl_module
--with-ipv6
--add-module=/tmp/buildd/nginx-0.7.64/modules/nginx-upstream-fair

location ~ getfile12.php$ {
set $limit_rate 512k;
limit_conn one 1;
proxy_pass http://192.168.0.20:80;
proxy_redirect off;
proxy_set_header Host dl2.filestore.com.ua;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
client_body_buffer_size 32k;
proxy_connect_timeout 30;
proxy_send_timeout 60;
proxy_read_timeout 60;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
proxy_temp_path /var/www/dl/storage/tmp;

}

nginx2:
> nginx -V
nginx version: nginx/0.7.64
TLS SNI support enabled
configure arguments: --conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid
--lock-path=/var/lock/nginx.lock
--http-log-path=/var/log/nginx/access.log
--http-client-body-temp-path=/var/lib/nginx/body
--http-proxy-temp-path=/var/lib/nginx/proxy
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-debug
--with-http_stub_status_module --with-http_flv_module
--with-http_ssl_module --with-http_dav_module
--with-http_gzip_static_module --with-mail --with-mail_ssl_module
--with-ipv6
--add-module=/tmp/buildd/nginx-0.7.64/modules/nginx-upstream-fair

location ~ getfile12.php$ {
# limit_conn one 10;
# set $limit_rate 100M;
proxy_pass http://127.0.0.1:8080;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
client_body_buffer_size 32k;
proxy_connect_timeout 30;
proxy_send_timeout 60;
proxy_read_timeout 60;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
proxy_temp_path /var/www/dl/storage/tmp;

}
location /storage/files/ {
# directio 2m;
output_buffers 1 1m;
internal;
root /var/www/dl;
error_page 503 = /503.html;
}

Не работают ограничения, которые задаются на nginx1 set $limit_rate
512k; и limit_conn one 1;
Что сделать, чтобы они работали?

--
WBR, Andrey Vasilishin CDIG1-UANIC, CDIG1-RIPE



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

Не работает set $limit_rate и limit_conn

Андрей Василишин December 14, 2009 04:30PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 268
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