nginx - client_max_body_size has no effect

前端 未结 13 1839
无人共我
无人共我 2020-11-28 01:13

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 th

13条回答
  •  北海茫月
    2020-11-28 01:19

    Someone correct me if this is bad, but I like to lock everything down as much as possible, and if you've only got one target for uploads (as it usually the case), then just target your changes to that one file. This works for me on the Ubuntu nginx-extras mainline 1.7+ package:

    location = /upload.php {
        client_max_body_size 102M;
        fastcgi_param PHP_VALUE "upload_max_filesize=102M \n post_max_size=102M";
        (...)
    }
    

提交回复
热议问题