+ -
当前位置:首页 → 问答吧 → 关于nginx的限制线程问题

关于nginx的限制线程问题

时间:2011-08-30

来源:互联网

在网上搜了一下,有如下方法:
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秒内)不止一次。
是否有大侠遇到过这情况呢?我是希望无论用什么方法下载都只能单线程的。

作者: natici   发布时间: 2011-08-30

nginx不清楚 apache 有 so 可以用.

作者: PhpNewnew   发布时间: 2011-08-31