简体   繁体   English

WordPress的:413请求实体太大

[英]Wordpress: 413 Request Entity Too Large

I have a WP site managed on an Ubuntu server with Plesk. 我有一个使用Plesk在Ubuntu服务器上管理的WP网站。 For a few hours I can not upload files above 2MB. 几个小时后,我无法上传2MB以上的文件。 I have made several attempts like: 我做了几次尝试,例如:

  • Change the settings from php.ini (verifying via phpinfo () that they were set correctly). 从php.ini更改设置(通过phpinfo()验证设置是否正确)。 Both through Plesk and manually; 通过Plesk和手动;
  • Change different PHP versions (from 5.6, 7.0.x, 7.1.x, to 7.2.x); 更改不同的PHP版本(从5.6、7.0.x,7.1.x到7.2.x);
  • Disabled firewall; 禁用防火墙;
  • Tested with different types and name files; 经过不同类型和名称文件的测试;
  • Set the upload limit with nginx (either manually or via plesk); 使用nginx设置上传限制(手动或通过plesk);
  • Tried to set the limit via .htaccess and / or wp-config; 试图通过.htaccess和/或wp-config设置限制;
  • Updated WP, ​​plugins and themes; 更新了WP,插件和主题;
  • Disabled all plugins; 禁用所有插件;
  • Try to decrease the upload limit to 1 MB (in this case it displayed the limit and did not allow me to proceed with the upload); 尝试将上传限制降低到1 MB(在这种情况下,它显示了限制,并且不允许我继续上传);
  • Tested by other PC / browsers. 经过其他PC /浏览器测试。

On other sites uploaded to the same server, with the same settings (one is the backup of the site in question) instead I can correctly upload the files. 在其他上传到同一服务器上且具有相同设置(一个是该网站的备份)的网站上,我可以正确上传文件。

On the file upload screen I see the upload limit correctly (for example 64M) but if I upload a file greater than 2MB I see the error: 在文件上传屏幕上,我可以正确看到上传限制(例如64M),但是如果我上传的文件大于2MB,则会看到错误:

413 Request Entity Too Large 413请求实体太大

What could it be? 会是什么呢? Do you have any ideas / suggestions on this? 您对此有任何想法/建议吗?

Thanks a lot! 非常感谢!

To fix, you need to set server block like this 要修复,您需要像这样设置服务器块

server {
client_max_body_size 0;
...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM