nginx 413 Request Entity Too Large的问题,nginxentity



/etc/nginx/(代理一个)

/etc/nginx/conf.d/(代理多个)

/etc/nginx/sites-enabled/(旧版多个)
下编辑配置文件,

server {  
    ...  
    client_max_body_size 20m;  
    ...  
}  

然后重启nginx即可

service nginx restart

如果不是这个问题,而你用的php-fpm,那也有可能是php.ini的配置问题

/etc/php5/fpm/php.ini

/etc/php.ini

修改配置

upload_max_filesize = 20M  
post_max_size = 20M  

最后,如果你是因为wordpress要上传的问题,那就多余了,连ftp都不用搭建

只需在wordpress根目录下配置wp-config.php即可

define("FS_METHOD","direct");

define("FS_CHMOD_DIR", 0777);

define("FS_CHMOD_FILE", 0777);

如果有权限问题,就授权

chmod -R 777 wordpress的目录

相关内容

    暂无相关文章