nginx自从1.1.8版本发布后将limit_conn更换为limit_conn_zone 。

对应则需要修改配置文件

在nginx.conf的http下面加入下面代码
limit_conn_zone $binary_remote_addr zone=addr:10m;
在站点的server区域加入下面代码

location / {
limit_conn addr 1;
limit_rate 300k;
}
这样限速为300k
然后重载nginx配置文件 service nginx reload
交流QQ:2881064156

相关文章:

  • 2022-12-23
  • 2021-12-17
  • 2021-11-07
  • 2021-11-03
  • 2022-12-23
  • 2021-07-25
  • 2022-02-13
猜你喜欢
  • 2021-10-03
  • 2021-12-08
  • 2021-11-15
  • 2021-11-14
相关资源
相似解决方案