分类: 系统运维
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