码迷,mamicode.com
首页 > Web开发 > 详细

LNPM 大文件上传修改

时间:2020-03-03 21:04:41      阅读:87      评论:0      收藏:0      [点我收藏+]

标签:post   ams   dex   roo   spl   include   script   pass   file   

配置 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 大文件上传修改

标签:post   ams   dex   roo   spl   include   script   pass   file   

原文地址:https://www.cnblogs.com/gromm/p/12404243.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!