nginx 限制ip并发
2012-07-05 13:54
267 查看
博客已经搬家,请访问如下地址:http://www.czhphp.com
昨天服务器被ddos攻击了两次,全网瘫痪了,而且两个ip都被机房封掉了,悲催的啊
所以赶快限制下ip的并发吧
http{
........
#这个是限制连接的存储区
limit_zone apks $binary_remote_addr 30m;
#这个是限制请求的存储区
limit_req_zone $binary_remote_addr zone=one:30m rate=1r/s;
.......
}
server
{
listen 80;
server_name *******;
index index.php index.htm index.html;
root /home/wwwroot/abc;
location / {
#限制请求速率 这里限制为每秒1个请求
limit_req zone=one burst=5;
#限制并发数,这里限制为2个连接. 多余的连接会返回503错误
limit_conn apks 2;
}
博客已经搬家,请访问如下地址:http://www.czhphp.com
昨天服务器被ddos攻击了两次,全网瘫痪了,而且两个ip都被机房封掉了,悲催的啊
所以赶快限制下ip的并发吧
http{
........
#这个是限制连接的存储区
limit_zone apks $binary_remote_addr 30m;
#这个是限制请求的存储区
limit_req_zone $binary_remote_addr zone=one:30m rate=1r/s;
.......
}
server
{
listen 80;
server_name *******;
index index.php index.htm index.html;
root /home/wwwroot/abc;
location / {
#限制请求速率 这里限制为每秒1个请求
limit_req zone=one burst=5;
#限制并发数,这里限制为2个连接. 多余的连接会返回503错误
limit_conn apks 2;
}
博客已经搬家,请访问如下地址:http://www.czhphp.com
相关文章推荐
- Nginx限制IP访问,访问速率和最大并发数及下载带宽
- Nginx限制IP并发数与下载速度的方法
- nginx 限制ip并发数和限制速度
- Nginx(十五):Nginx并发优化专题(4)——限制同一个 IP 的并发数
- nginx限制ip并发数
- nginx与apache限制ip并发访问 限制ip连接的设置方法
- nginx apache限制ip并发访问 限制ip连接
- nginx 添加白名单和限制IP并发来源数
- nginx 限制ip并发数和限制速度
- nginx限制ip并发数和访问频率以及下载速度
- nginx限制ip请求次数 以及并发次数
- nginx限制每个ip访问的频率和并发量
- nginx限制ip请求次数 以及并发次数
- Nginx 限制IP并发数及速度
- nginx 限制指定ip的并发数和 速度
- Nginx在CDN加速之后,获取用户真实IP做并发访问限制的方法
- nginx限制ip并发数
- Nginx限制IP并发数与下载速度的方法
- nginx限制每个ip访问的频率和并发量
- nginx 限制ip并发