nginx+php上传文件大小控制(500 internal server error)

简介:

前提:系统参数已经基本优化完成。

1.nginx nginx.conf

client_max_body_size 100m;

client_body_temp_path /tmp;

2.php.ini

post_max_size = 100M

file_uploads = On

upload_max_filesize = 100

memory_limit = 1024M

3.当然,php脚本执行上传时间也受控制,所以适当加长request terminate时间。





本文转自 baiying 51CTO博客,原文链接:http://blog.51cto.com/baiying/1288406,如需转载请自行联系原作者
目录
相关文章
|
网络协议 应用服务中间件 nginx
FFmpeg错误笔记(一):nginx-rtmp-module推流出现 Server error: Already publishing
这篇文章讨论了在使用nginx-rtmp-module进行RTMP推流时遇到的“Server error: Already publishing”错误,分析了错误原因,并提供了详细的解决办法,包括修改nginx配置文件和终止异常的TCP连接。
813 0
FFmpeg错误笔记(一):nginx-rtmp-module推流出现 Server error: Already publishing
|
应用服务中间件 nginx
nginx error日志 client intended to send too large body: 1434541 bytes 如何处理?
【8月更文挑战第27天】nginx error日志 client intended to send too large body: 1434541 bytes 如何处理?
1130 6
|
JavaScript 应用服务中间件 PHP
nginx server 禁止特定目录下的某类文件访问
【8月更文挑战第26天】这段Nginx配置代码旨在保护`/uploads/`目录下的文件,禁止执行任何`.php`, `.html`, `.htm`, 或 `.js`等潜在有害文件,即便被访问也无法运行。取而代之的是重定向到首页。为了实现这一设置,用户需要定位到对应子域名的`.conf`配置文件中进行相应修改。若网站支持多个访问域名,则需确保在正确的`.conf`文件中实施此配置。
598 1
|
PHP Windows
【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误
【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误
377 1
|
前端开发 PHP 开发者
React Server Component 使用问题之怎么使用Docker运行PHP应用
React Server Component 使用问题之怎么使用Docker运行PHP应用
172 1
|
JSON 应用服务中间件 nginx
Nginx的server块和location块的简单说明
Nginx的server块和location块的简单说明
|
NoSQL 关系型数据库 MySQL
linux服务器重启php,nginx,redis,mysql命令
linux服务器重启php,nginx,redis,mysql命令
409 1
|
tengine 安全 应用服务中间件
修改Nginx/Tengine版本名称伪装任意WEB SERVER
修改Nginx/Tengine版本名称伪装任意WEB SERVER
531 1
|
前端开发 JavaScript 算法
RSC 就是套壳 PHP ?带你从零实现 React Server Component
RSC 就是套壳 PHP ?带你从零实现 React Server Component
461 0
|
关系型数据库 应用服务中间件 Linux
Nginx和php安装及配置:mysql安装教程
Nginx和php安装及配置:mysql安装教程http://www.bieryun.com/3052.html 一、mysql简介 说到数据库,我们大多想到的是关系型数据库,比如mysql、oracle、sqlserver等等,这些数据库软件在windows上安装都非常的方便,在Linux上如果要安装数据库,咱不得不首先推荐的是mysql数据库了,而且Mysql数据库的第一个版本就是发行在Linux系统上的。
2225 0