Chinaunix首页 | 论坛 | 博客
  • 博客访问: 83785
  • 博文数量: 50
  • 博客积分: 2674
  • 博客等级: 少校
  • 技术积分: 565
  • 用 户 组: 普通用户
  • 注册时间: 2009-06-29 09:40
文章分类

全部博文(50)

文章存档

2012年(1)

2010年(49)

我的朋友
最近访客

分类: 系统运维

2010-01-07 11:49:01

nginx限制ip并发数,也是说限制同一个ip同时连接服务器的数量

1.添加limit_zone
这个变量只能在http使用
vi /usr/local/nginx/conf/nginx.conf


limit_zone one $remote_addr 10m;

2.添加limit_conn
这个变量可以在http, server, location使用

limit_conn   one  10;

3.重启nginx
killall -HUP nginx

阅读(374) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~