Nginx reverse proxy error when uploading large files (failed to load resource : net :: ERR_CONNECTION_RESET)
http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size
Text
Dang When using Nginx reverse proxy to upload large files, an error occurred
<code>failed <span>to</span><span>load</span> resource : net :: ERR_CONNECTION_RESET</code>
It was found to be a configuration issue with Nginx.
Use
<code>client_max_body_size <span>size</span>;</code>
to configure the maximum allowed value of Body in the request. The unit of size is M, and the default setting of Nginx is 1m. You can set the value as needed. For example, the limit is 1G:
<code>client_max_body_size 1024m;</code>
This configuration can be placed anywhere in http | server | location, corresponding to different scopes.
Attached
Official document description:
<code><span>Syntax</span>: <span>client_max_body_size size;</span><span>Default</span>: <span>client_max_body_size 1m;</span><span>Context</span>: <span>http, server, location</span></code>
Sets the maximum allowed size of the client request body, specified in the “Content-Length” request header field. If the size in a request exceeds the configured value, the 413 (Request Entity Too Large) error is returned to the client. Please be aware that browsers cannot correctly display this error. Setting size to 0 disables checking of client request body size.
').addClass('pre-numbering').hide( ); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });The above introduces the Nginx reverse proxy error when uploading large files (failed to load resource: net::ERR_CONNECTION_RESET), including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.