• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

nginx: 413 Request Entity Too Large

Azurel

Silver Pleskian
Bug in nginx: 413 Request Entity Too Large

Plesk 11.5.30

I want upload with plupload a 1.53MB image and get back a error:

<html>
<head><title>413 Request Entity Too Large</title></head>
<body bgcolor="white">
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>nginx</center>
</body>
</html>

Google says that I must set

http {
# some directives

client_max_body_size 20M;

# some more directives
}

So I go to plesk "Web Server Settings for ..." and set for nginx input this line:
client_max_body_size 20M;

And get red colored error text:
Invalid nginx configuration: nginx: [emerg] "client_max_body_size" directive is duplicate in /var/www/vhosts/system/domain.com/conf/vhost_nginx.conf:1 nginx: configuration file /etc/nginx/nginx.conf test failed

This domain have _not_ vhost_nginx.conf before. Its with this error message new created and empty.


What can I do?


EDIT: Email says
Template_Exception: nginx: [emerg] "client_max_body_size" directive is duplicate in /var/www/vhosts/system/domain.com/conf/vhost_nginx.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed

file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 68
code: 0

In /etc/nginx/nginx.conf the string "client_max_body_size" not exists. But in Include its present for "SERVER" as value "128m". But not for "HTTP". Is this a bug?

EDIT: Found Bugreport for plesk here: http://wiki.1awww.com/wiki/413_Request_Entity_Too_Large (german)
 
Last edited:
Please add into nginx configuration file:

client_max_body_size 0;

to /etc/nginx/nginx.conf and reload nginx proxy server:

# /etc/init.d/nginx reload

Or you can simply disable nginx proxy server.
 
Just chucking my two cents in on this issue. I tried the steps in the following kb article: http://kb.odin.com/en/122689

Unfortunatly that didn't work, and I was still unable to add the "client_max_body_size" to Additional nginx directives field for each domain.

In the end, as IgorG mentioned, the only option was to stop Reverse Proxy Server (nginx) in Plesk Services Management.

Once I did that, I could easily upload a 137MB file, without the fatal 413 error.

BUT, will the Reverse Proxy be re-started on a server reboot IgorG?
 
Back
Top