413请求实体太大 [英] 413 Request Entity Too Large
本文介绍了413请求实体太大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我向服务器发布数据时,我使用nginX/1.6和laravel出现此错误413请求实体太大.我尝试了很多解决方案,如下所示
I use nginX/1.6 and laravel when i posted data to server i get this error 413 Request Entity Too Large. i tried many solutions as bellow
1- set client_max_body_size 100m; in server and location and http in nginx.conf.
2- set upload_max_filesize = 100m in php.ini
3- set post_max_size = 100m in php.ini
重新启动php5-fpm和nginx之后,问题仍然没有解决
After restarting php5-fpm and nginx the problem still not solved
推荐答案
在/etc/nginx/nginx.conf的http部分中添加"client_max_body_size xxM",其中xx是您要允许的大小(以兆字节为单位)
Add ‘client_max_body_size xxM’ inside the http section in /etc/nginx/nginx.conf, where xx is the size (in megabytes) that you want to allow.
http {
client_max_body_size 20M;
}
这篇关于413请求实体太大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文