nginx-client_max_body_size无效 [英] nginx - client_max_body_size has no effect

查看:1397
本文介绍了nginx-client_max_body_size无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

nginx一直说client intended to send too large body. Googling和RTM将我指向client_max_body_size.我在nginx.confvhost conf中都将其设置为200m,重新启动了Nginx几次,但是我仍然收到错误消息.

nginx keeps saying client intended to send too large body. Googling and RTM pointed me to client_max_body_size. I set it to 200m in the nginx.conf as well as in the vhost conf, restarted Nginx a couple of times but I'm still getting the error message.

我忽略了什么吗?后端是php-fpm(已相应设置max_post_sizemax_upload_file_size).

Did I overlook something? The backend is php-fpm (max_post_size and max_upload_file_size are set accordingly).

推荐答案

遵循 nginx文档 ,您可以在以下情况下将client_max_body_size设置为20m(或您需要的任何值):

Following nginx documentation, you can set client_max_body_size 20m ( or any value you need ) in the following context:

context: http, server, location

这篇关于nginx-client_max_body_size无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆