Nginx 配置之解决 413 错误(Request Entity Too Large)

Nginx About 399 words

错误信息

Failed to load resource: the server responded with a status of 413 (Request Entity Too Large)
使用 Nginx 服务器上传文件时,浏览器报 413 请求过大。

设置 Nginx 参数

找到配置文件nginx.conf(如没有额外配置其他conf),在http{}server{}location{}节点下添加client_max_body_size

默认client_max_body_size大小为1m

client_max_body_size 10m; #(改成你想要的数值)

重新加载

nginx -s reload

参考

http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size

Views: 5,988 · Posted: 2019-03-20

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh