ngnix 413 Request Entity Too Large
时间: 2023-10-13 10:04:18 浏览: 97
当使用Nginx反向代理服务器进行附件相关的操作时,如果文件大小超过1M,就会出现413 Request Entity Too Large的错误。这是由于Nginx客户端默认的最大请求体大小是1M所导致的。要解决这个问题,可以通过配置Nginx来增大请求体的大小限制。具体的解决方案是在Nginx配置文件中设置client_max_body_size指令来指定客户端请求体的最大允许大小。例如,在一个名为/test的location下,可以设置client_max_body_size为1024m,将此路由请求的实体大小限制为1024m。然后,重启Nginx使配置生效。这样就能解决413 Request Entity Too Large的问题了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [NGINX 报错 413 Request Entity Too Large 解决方案](https://blog.csdn.net/hhd1988/article/details/108848499)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [Nginx服务出现413 Request Entity Too Large的解决办法](https://blog.csdn.net/jpgzhu/article/details/105674685)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文