LNPM 大文件上传修改
Posted gromm
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LNPM 大文件上传修改相关的知识,希望对你有一定的参考价值。
配置 php.ini
sed -i "s/upload_max_filesize = 20M/upload_max_filesize = 300M/g" /etc/php.ini
sed -i "s/post_max_size = 8M/post_max_size = 330M/g" /etc/php.ini
sed -i "s/max_execution_time = 30/max_execution_time = 300/g" /etc/php.ini
sed -i "s/max_input_time = 60/max_input_time = 300/g" /etc/php.ini
配置nginx虚拟站点
location ~ .php$ {
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
// 下面三项
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
}
如果用了代理,代理处需要改配置
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
注意 fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; 三行必须在 include fastcgi_params 后面,否则报错 nginx: [emerg] unknown directive "fastcgi_rend_timeout" in
以上是关于LNPM 大文件上传修改的主要内容,如果未能解决你的问题,请参考以下文章