nginx - client_max_body_size 没有效果 [英] nginx - client_max_body_size has no effect
问题描述
nginx 一直说 client 打算发送太大的 body
.谷歌搜索和 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屋!