Avoid nginx 411 Content-Length required errors

10 篇文章 0 订阅
4 篇文章 0 订阅

http://www.l99.com/1548156/blog/view/283241

3.添加chunkin-nginx-module模块

nginx报 411 错误,需要安装此模块

192.168.60.100 - - [11/May/2011:09:45:53 +0800] "PUT /ehcache/rest/cs/1 HTTP/1.1" 411 181 "-" "curl/7.21.3 (i686-pc-linux-gnu) libcurl/7.21.3 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18"

 

添加方法

从此处下载最新安装文件

http://github.com/agentzh/chunkin-nginx-module/downloads


编译的时候加入这个模块 

 ./configure  --user=nginx --group=nginx --add-module=../ngx_cache_purge-1.2 --prefix=/usr/local/nginx --with-http_sub_module --with-http_ssl_module --with-http_realip_module --with-debug --with-http_stub_status_module --add-module=/usr/local/src/agentzh-chunkin-nginx-module-847b3de/

make -j2
make install
在配置文件中 打开 这个功能 
        server {
                chunkin on;

                error_page 411 = @my_411_error;
                location @my_411_error {
                chunkin_resume;
                }

                listen 8080;
                location / {
                        proxy_set_header Host $host;
                        proxy_set_header X-Forwarded-For $remote_addr;
                        proxy_pass http://backend;
                }

           }


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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值