美文网首页
nginx 设置上传大小 client_max_body_siz

nginx 设置上传大小 client_max_body_siz

作者: 呂鳳先 | 来源:发表于2018-04-01 17:14 被阅读0次
    1. 以下代码加入 /etc/nginx/nginx.conf 文件中的 http{ ... } 块中
    # set client body size to 8M #
    client_max_body_size 8M;
    
    1. php 设置上传大小

    打开 /etc/php5/fpm/php.ini 文件中 修改以下几个参数

    ;This sets the maximum amount of memory in bytes that a script is allowed to allocate
    memory_limit = 32M
     
    ;The maximum size of an uploaded file.
    upload_max_filesize = 8M
     
    ;Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize
    post_max_size = 16M
    

    相关文章

      网友评论

          本文标题:nginx 设置上传大小 client_max_body_siz

          本文链接:https://www.haomeiwen.com/subject/szkacftx.html