Nginx反向代理上傳大文件報錯(failed to load resource : net :: ERR_CONNECTION_RESET)


轉自:

https://blog.csdn.net/kinginblue/article/details/50753271?locationNum=14&fps=1

Nginx反向代理上傳大文件報錯(failed to load resource : net :: ERR_CONNECTION_RESET)
http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size

正文
當使用Nginx反向代理上傳大文件報錯

failed to load resource : net :: ERR_CONNECTION_RESET
1
經查是Nginx的配置問題。
使用

client_max_body_size size;
1
用於配置請求中Body的最大可允許值。size的單位為M,Nginx默認的設置是1m。數值按需自行設置即可。例如限制為1G:

client_max_body_size 1024m;
1
此配置可放在 http | server | location 任一處,對應不同的作用范圍。


官方文檔說明:

Syntax: client_max_body_size size;
Default: client_max_body_size 1m;
Context: http, server, location
1
2
3
  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.
---------------------
作者:kinginblue
來源:CSDN
原文:https://blog.csdn.net/kinginblue/article/details/50753271
版權聲明:本文為博主原創文章,轉載請附上博文鏈接!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM