Nginx 限制并发数和带宽
[ 2009/09/30 11:03 | by selboo ]
nginx 限制IP连接数和每个IP连接速度
{
listen 80;
server_name download.selboo.com.cn;
index index.html index.htm default.html default.htm index.php;
root /wwwroot/selboo/download/;
limit_zone limit $binary_remote_addr 10m;
location / {
limit_conn limit 2;
limit_rate 50k;
}
}
This is The Code
server{
listen 80;
server_name download.selboo.com.cn;
index index.html index.htm default.html default.htm index.php;
root /wwwroot/selboo/download/;
limit_zone limit $binary_remote_addr 10m;
location / {
limit_conn limit 2;
limit_rate 50k;
}
}
Parsed in 0.000 seconds at N/A