nginx ngx_http_limit_conn_module

环境: ubuntu 16.04  apt-get 模式安装nginx 

添加新模块 ngx_http_limit_conn_module 和 ngx_http_limit_req_module

1.下载nginx source  链接nginx/1.10.3

2. sudo nginx -V 

nginx version: nginx/1.10.3
built by gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 
built with OpenSSL 1.0.2k  26 Jan 2017
TLS SNI support enabled
configure arguments: --with-cc-opt='-g .....

3. 解压nginx.tar.gz 复制 --with 后面配置参数 ./configure   复制 --with 后面配置参数 
加上  --add-module=ngx_http_limit_req_module --add-module=ngx_http_limit_reg_module 


tips:  
1.这里使用--add-module (使用--add-dynamic-module 应该也可以没有测试) 而非 --with-ngx....
2.如果出现 ./configure: error: no ngx_http_limit_req_module/config was found 错误
个人通过手动创建这个文件 mkdir ngx_http_limit_req_module && touch ngx_http_limit_req_module/config 解决
3. 可能出现的一些库不存在的处理
//limxslt
sudo apt-get install libxml2 libxml2-dev libxslt-dev


//the HTTP image filter module requires the GD library.


sudo apt-get install libgd2-xpm libgd2-xpm-dev 

//the GeoIP module requires the GeoIP library.


sudo apt-get install geoip-database libgeoip-dev


需要添加的module 根据自己的环境自行决定舍取.


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值