nginx-client_max_body_size无效 [英] nginx - client_max_body_size has no effect
问题描述
nginx一直说client intended to send too large body
. Googling和RTM将我指向client_max_body_size
.我在nginx.conf
和vhost 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_size
和max_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屋!