zoukankan      html  css  js  c++  java
  • [error] 2230#2230: *84 client intended to send too large body: 1711341 bytes

    centos7 lnmp部署知乎上传主体报错

    2019/01/17 18:55:27 [error] 2230#2230: *89 open() "/code/wordpress/favicon.ico" failed (2: No such file or directory), client: 10.0.0.1, server: blog.lvhanzhi.com, request: "GET /favicon.ico HTTP/1.1", host: "10.0.0.7"

    错误原因:nginx上传文件大小是有限制的,现在上传的文件超过了规定的大小

    解决方法:修改nginx上传文件大小

    [root@web01 ~]# vim /etc/nginx/conf.d/blog.lvhanzhi.com.conf
    server {
    listen 80;
    server_name blog.lvhanzhi.com;
    root /code/wordpress;
    client_max_body_size 100m;
    location / {
    index index.php index.html;
    }
    location ~.php$ {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    }

    }
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    "/etc/nginx/conf.d/blog.lvhanzhi.com.conf" 15L, 302C written
    [root@web01 ~]# nginx -t
    nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
    nginx: configuration file /etc/nginx/nginx.conf test is successful
    [root@web01 ~]# systemctl restart nginx

  • 相关阅读:
    Codeforces Round #609 (Div. 2)
    Educational Codeforces Round 78 (Rated for Div. 2)
    Codeforces
    crontab
    C6 C7的开机启动流程
    平均负载压力测试
    ps 和 top
    if判断
    使用3种协议搭建本地yum仓库
    linux rpm包
  • 原文地址:https://www.cnblogs.com/lvhanzhi/p/10283984.html
Copyright © 2011-2022 走看看