nginx client_max_body_size 的问题

遇到上传文件问题

“413 Request Entity Too Large”

查到了 nginx client_max_body_size ,原来默认值只有 1m,太小了

增大他,在 location 中添加下面设置

client_max_body_size 6m;

nginx reload, 不生效, 再试,把上面设置放 server 中,还不生效,继续放 http 中,这回生效了

这是什么问题,nginx 的文档上面明明写着 他可以放在 http server location 里面的

这是 nginx 的 bug,还是 nginx 的特性

如果是特性的话我想 http server location 只能从大到小,不能从小到大

This entry was posted in Linux and tagged , . Bookmark the permalink.

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>