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连接。
863 0
FFmpeg错误笔记(一):nginx-rtmp-module推流出现 Server error: Already publishing
|
JavaScript 应用服务中间件 PHP
nginx server 禁止特定目录下的某类文件访问
【8月更文挑战第26天】这段Nginx配置代码旨在保护`/uploads/`目录下的文件,禁止执行任何`.php`, `.html`, `.htm`, 或 `.js`等潜在有害文件,即便被访问也无法运行。取而代之的是重定向到首页。为了实现这一设置,用户需要定位到对应子域名的`.conf`配置文件中进行相应修改。若网站支持多个访问域名,则需确保在正确的`.conf`文件中实施此配置。
662 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. 错误
430 1
|
JSON 应用服务中间件 nginx
Nginx的server块和location块的简单说明
Nginx的server块和location块的简单说明
|
NoSQL 关系型数据库 MySQL
linux服务器重启php,nginx,redis,mysql命令
linux服务器重启php,nginx,redis,mysql命令
458 1
|
tengine 安全 应用服务中间件
修改Nginx/Tengine版本名称伪装任意WEB SERVER
修改Nginx/Tengine版本名称伪装任意WEB SERVER
621 1
|
应用服务中间件 Linux 网络安全
【Azure 应用服务】PHP应用部署在App Service for Linux环境中,上传文件大于1MB时,遇见了413 Request Entity Too Large 错误的解决方法
【Azure 应用服务】PHP应用部署在App Service for Linux环境中,上传文件大于1MB时,遇见了413 Request Entity Too Large 错误的解决方法
545 0
|
Linux PHP
【Azure 应用服务】PHP项目部署到App Service for Linux环境中,如何修改上传文件大小的限制呢?
【Azure 应用服务】PHP项目部署到App Service for Linux环境中,如何修改上传文件大小的限制呢?
284 0
|
应用服务中间件 Linux 网络安全
PHP应用部署在App Service for Linux环境中,上传文件大于1MB时,遇见了413 Request Entity Too Large 错误的解决方法
在Azure App Service for Linux上部署的PHP应用遇到上传文件超过1MB时出现413 Request Entity Too Large错误的解决之法
753 0
|
PHP Apache
PHP中$_SERVER的详细参数与说明
[1].[代码] [PHP]代码 跳至 [1] ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 $_SERVER['PHP_SELF'] #当前正在执行脚本的文件名,与 document root相关。
1129 0