nginx报错 client intended to send too large body: 13346 bytes

1、nginx后台error日志报错信息如下:

2019/02/01 13:06:35 [error] 14324#0: *448906971 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.14, server: localhost, request: "GET /h5teb/ugcH5/index.htm?source=android&mall=8&TGC=911FDD2F99B84D528F0A7EE71780A943 HTTP/1.1", upstream: "http://192.168.1.14:8080/h5teb/ugcH5/index.htm?source=android&mall=8&TGC=911FDD2F99B84D528F0A7EE71780A943", host: "192.168.1.14"
2019/02/01 13:06:45 [error] 12013#0: *441119082 client intended to send too large body: 13346 bytes, client: 192.168.1.14, server: localhost, request: "POST /h5teb/complaints/save.htm HTTP/1.1", host: "192.168.1.14", referrer: "http://192.168.1.14/h5teb/complaints/index.htm"

2、添加对文件上传的限制

在转发http中进行配置10m的上限,client_max_body_size 10m
host-192-168-1-15:/usr/local/nginx/logs #  vim /usr/local/nginx/conf/nginx.conf
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    client_header_buffer_size 64k;
    large_client_header_buffers 4 64k;
    client_body_buffer_size 20m;
    client_max_body_size 10m;
    proxy_buffer_size 64k;
    proxy_buffers 4 128k;
    proxy_busy_buffers_size 256k;
    underscores_in_headers on;
    }

3、重新加载nginx服务即可

host-192-168-1-15:/usr/local/nginx # ./sbin/nginx -s reload
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
2023/07/24 15:14:58 [error] 721#0: *763 client intended to send too large body: 113069413 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89/XMind2022%EF%BC%8864bit%EF%BC%89/app.asar HTTP/2.0", host: "hetx.top" 2023/07/24 15:15:06 [error] 721#0: *763 client intended to send too large body: 113069413 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89/XMind2022%EF%BC%8864bit%EF%BC%89/app.asar HTTP/2.0", host: "hetx.top" 2023/07/24 15:16:12 [error] 721#0: *763 client intended to send too large body: 134120318 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89.7z HTTP/2.0", host: "hetx.top" 2023/07/24 15:16:40 [error] 721#0: *763 client intended to send too large body: 134120318 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89.7z HTTP/2.0", host: "hetx.top" 2023/07/24 15:16:43 [error] 721#0: *763 client intended to send too large body: 134120318 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89.7z HTTP/2.0", host: "hetx.top" 2023/07/24 15:16:45 [error] 721#0: *763 client intended to send too large body: 134120318 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89.7z HTTP/2.0", host: "hetx.top" 2023/07/24 15:19:37 [error] 721#0: *878 client intended to send too large body: 134120318 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89.7z HTTP/2.0", host: "hetx.top" 2023/07/24 15:20:30 [error] 721#0: *878 client intended to send too large body: 134120318 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/XMind2022%EF%BC%8864bit%EF%BC%89.7z HTTP/2.0", host: "hetx.top" 2023/07/24 15:31:12 [error] 1209#0: *28 client intended to send too large body: 134120318 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89.7z HTTP/2.0", host: "hetx.top" 2023/07/24 15:42:10 [error] 1209#0: *110 directory index of "/www/wwwroot/hetx.top/static/" is forbidden, client: 113.142.131.55, server: hetx.top, request: "GET /static/ HTTP/1.1", host: "hetx.top"
最新发布
07-25

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

运维那些事~

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值