Home > Backend Development > PHP Tutorial > Nginx reverse proxy reports error when uploading large files (failed to load resource: net::ERR_CONNECTION_RESET)

Nginx reverse proxy reports error when uploading large files (failed to load resource: net::ERR_CONNECTION_RESET)

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-29 09:01:51
Original
8129 people have browsed it

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>
Copy after login

It was found to be a configuration issue with Nginx.
Use

<code>client_max_body_size <span>size</span>;</code>
Copy after login

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>
Copy after login

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>
Copy after login

  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.

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template