To set Nginx Upload Size For “413–Request Entity Too Large” Error
Modify NGINX Configuration File
sudo nano /etc/nginx/nginx.conf
Search for this variable: client_max_body_size. If you find it, just increase its size to 100M, for example. If it doesn’t exist, then you can add it inside and at the end of http
client_max_body_size 100M;
Restart nginx to apply the changes.
sudo service nginx restart
Modify PHP.ini File for Upload Limits
It’s not needed on all configurations, but you may also have to modify the PHP upload settings as well to ensure that nothing is going out of limit by php configurations.
If you are using PHP5-FPM use following command,
sudo nano /etc/php5/fpm/php.ini
If you are using PHP7.0-FPM use following command,
sudo nano /etc/php/7.0/fpm/php.ini
Now find following directives one by one
upload_max_filesize
post_max_size
and increase its limit to 100M, by default they are 8M and 2M.
upload_max_filesize = 100M
post_max_size = 100M
Finally save it and restart PHP.
PHP5-FPM users use this,
sudo service php5-fpm restart
PHP7.0-FPM users use this,
sudo service php7.0-fpm restart
It will work fine !!!
To set Nginx Upload Size For “413–Request Entity Too Large” Error的更多相关文章
- nginx:413 Request Entity Too Large 及 修改 PHP上传文件大小配置
开发环境:CentOS + Nginx + PHP + MySql + phpMyAdmin 在用 phpMyAdmin 进行 sql 数据库导入的时候,经常需要上传比较大的 sql 数据文件,而这时 ...
- nginx解决超长请求串(413 request Entity too Large错误解决办法)
<div class="hide-article-box text-center" style="display: block;"> <a c ...
- Nginx解决错误413 Request Entity Too Large
最近一个项目当中,要求上传图片,并且限制图片大小,虽然在laravel当中已经添加了相关的表单验证来阻止文件过大的上传,然而当提交表单时,还没轮到laravel处理,nginx就先报错了.当你仔细看报 ...
- nginx 出现413 Request Entity Too Large问题的解决方法
nginx 出现413 Request Entity Too Large问题的解决方法 使用php上传图片(大小1.9M),出现 nginx: 413 Request Entity Too Large ...
- Nginx出现413 Request Entity Too Large错误解决方法
Nginx出现的413 Request Entity Too Large错误,这个错误一般在上传文件的时候出现,打开nginx主配置文件nginx.conf,找到http{}段,添加 解决方法就是 打 ...
- Nginx出现“413 Request Entity Too Large”错误解决方法
Nginx出现“413 Request Entity Too Large”错误解决方法 2011-03-25 13:49:55| 分类: 默认分类 | 标签:413 request entit ...
- Nginx:413 Request Entity Too Large解决
最近在做给博客添加上传PDF的功能,但是在测试上传文件的过程中遇到了413 Request Entity Too Large错误.不过这个无错误是很好解决的,这个错误的出现是因为上传的文件大小超过了N ...
- Nginx配置,413 Request Entity Too Large错误解决
今天有同事找我,说图片上传之后,不知道去哪里了.分析了一下问题,找到原因之后做了处理,这里简要记录一下. 问题原因: 1.首先后台log并无错误信息: 2.捡查了一下浏览器,发现network中有报错 ...
- Nginx 出现413 Request Entity Too Large 错误解决方法(上传大小限制)
| 时间:2013-09-05 20:19:14 | 阅读数:485075 [导读] Nginx出现的413 Request Entity Too Large错误,这个错误一般在上传文件的时候出现,打 ...
随机推荐
- mysql各种连接总结
术语解释: 1.内连接: 只连接匹配的行 2.左外连接: 包含左边表的全部行(不管右边的表中是否存在与它们匹配的行),以及右边表中全部匹配的行 3.右外连接: 包含右边表的全部行(不管左边的表中是否存 ...
- 第一模块第一章 review
---恢复内容开始--- 练习题: 1.简述编译型与解释型语言的区别,且分别列出你知道的那些属于编译型,哪些属于解释型 机器语言:由于计算机内部只能接受二进制代码,因此,用二进制代码0和1描述的指令称 ...
- centos6.8 安装python2.7 or python3.6
from:https://danieleriksson.net/2017/02/08/how-to-install-latest-python-on-centos/ 准备 # Start by mak ...
- SWFUpload乱码问题的解决
目前比较流行的是使用SWFUpload控件,这个控件的详细介绍可以参见官网http://demo.swfupload.org/v220/index.htm 在使用这个控件批量上传文件时发现中文文件名都 ...
- 实现spring IOC的常见二种方法 setter注入与构造器注入
案例: beans.xml配置 <?xml version="1.0" encoding="UTF-8"?><beansxmlns=" ...
- pipeenv error
[root@mhc tmp]# pipenv --python 3.6Creating a virtualenv for this project…Using /root/python3/bin/py ...
- 使用js获取伪元素的content
在测试过程中有时候会遇到反爬虫机制,一些元素会使用伪元素,这样在定位元素的时候会定位不到,这时候就要使用js来帮助定位,获取到想要的元素 下面是部分代码 //使用js获取伪元素的content Str ...
- 清理数据库errorlog
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOGERRORLOGERRORLOG.1ERRORLOG.2ERRORLOG.3ERRORLO ...
- gorm中数据库datetime类型的映射和time.Time的格式化
如果在结构体中设置time变量的类型是time.Time,那么gorm取出来的时间格式将会是”2006-01-02 15:04:05.999999999 -0700 MST“东八区时间,在time.T ...
- 可以foreach的 必须继承IEnumable 接口才行
只要是继承IEnumable 都可以用foreach遍历