nginx防hashdos模块使用帮助

五四陈科学院-坚信科学,分享技术 2012-01-16 00:03:36 累计浏览 4,182 次

    nginx,hashdos

     经过上周一周朋友们帮忙测试和bug fix,nginx_http_hashdos_module已经达到可以线上使用的水平,下面是使用记录。

     下载

    #wget --no-check-certificate https://github.com/54chen/nginx-http-hashdos-module/zipball/master

     #mv master nginx_hashdos.zip

     #unzip nginx_hashdos.zip

    编译安装

    #tar zxvf nginx-1.0.xx.tar.gz

     #cd nginx-1.0.xx/

     #./configure --prefix=/opt/soft/nginx --with-pcre --user=www --group=www --with-http_stub_status_module --with-http_ssl_module --add-module=../54chen-nginx-http-hashdos-module-f84d909

     #make && make install

    配置注意事项

     在http段,增加如下:

     hashdos on;

     body_max_count 1000;

    在各自的location段,要按照业务情况来加:

    client_body_buffer_size 2m;

     client_max_body_size 2m;

    *上述两个值一定要相等。

    如果是普通的discuz,上传上限是1m的,可以修改为1m。

     如果是没有上传功能的普通网站,建议修改为512k。

同分类推荐文章

  1. 全盘加密应对的威胁模型、分层设计与实践 (2026-11-14 03:10:02)
  2. 别了,SMTP mTLS (2026-11-14 00:10:02)
  3. Stop Writing Authentication Checks Into Every Service. Combine Them in your Kubernetes Gateway. (2026-10-27 13:40:42)

查看更多 安全 文章 →

建议继续学习

  1. 配置Nginx+uwsgi更方便地部署python应用 (累计阅读 109,257)
  2. 搜狐闪电邮箱的 Nginx/Postfix 使用模式 (累计阅读 34,259)
  3. 记录一个软中断问题 (累计阅读 17,393)
  4. 解析nginx负载均衡 (累计阅读 17,001)
  5. Nginx模块开发入门 (累计阅读 11,531)
  6. server日志的路径分析 (累计阅读 11,501)
  7. Cacti 添加 Nginx 监控 (累计阅读 11,297)
  8. 检查nginx配置,重载配置以及重启的方法 (累计阅读 11,291)
  9. fsockopen 异步处理 (累计阅读 10,807)
  10. 使用Squid缓存视频 (累计阅读 10,589)