在网上搜了一下,有如下方法:
limit_zone linuxtone $binary_remote_addr 10m;
server {
listen 80;
server_name down.linuxotne.org;
index index.html index.htm index.php;
root /data/www/wwwroot/down;
#Zone limit
location / {
limit_conn linuxtone 1;
limit_rate 20k;
}
..........
}limit_conn linuxtone 1;就是限制1线程,limit_rate 20k;就是每个线程20k。
可是我用迅雷测试却发现我用php记录的每个ip文件访问次数的短时间内(1秒内)不止一次。
是否有大侠遇到过这情况呢?我是希望无论用什么方法下载都只能单线程的。
limit_zone linuxtone $binary_remote_addr 10m;
server {
listen 80;
server_name down.linuxotne.org;
index index.html index.htm index.php;
root /data/www/wwwroot/down;
#Zone limit
location / {
limit_conn linuxtone 1;
limit_rate 20k;
}
..........
}limit_conn linuxtone 1;就是限制1线程,limit_rate 20k;就是每个线程20k。
可是我用迅雷测试却发现我用php记录的每个ip文件访问次数的短时间内(1秒内)不止一次。
是否有大侠遇到过这情况呢?我是希望无论用什么方法下载都只能单线程的。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货