Bobcares

Cannot set up client_max_body_size for Nginx in Plesk | Fixed

by | Feb 28, 2022

Cannot set up client_max_body_size for Nginx in Plesk and not sure what to do? Find out what our experts suggest.

At Bobcares, we offer solutions for every query, big and small, as a part of our Server Management Services.

Let’s take a look at how our Support Team is ready to help when customers cannot set up client_max_body_size for Nginx.

Solved: Cannot set up client_max_body_size for Nginx in Plesk

The Plesk bug #PPPM-1914 is responsible for preventing the successful set up of client_max_body_size for Nginx in Plesk.

Cannot set up client_max_body_size for nginx in Plesk

Plesk applies the ‘client_max_body_size 128m;’ directive by default for each domain although the server-wide value is ‘1m’. Furthermore, we can keep ‘128m’ as the default value server-wide with the following steps courtesy of our proficient Support Engineers. This will help resolve the issue on hand until a fix comes around as a part of the future product update:

  1. First, connect to the Plesk server via SSH as a root user.
  2. Next, set the global value for Nginx:
    # echo 'client_max_body_size 128m;' > /etc/nginx/conf.d/aa_client_max_body.conf
  3. Then, we will modify the /usr/local/psa/admin/conf/panel.ini file with the following command:
    # echo -e "[webserver]\n nginxClientMaxBodySize =\n" >> /usr/local/psa/admin/conf/panel.ini

    In case the panel.ini file does not exist, our Support Techs recommend creating it via a sample file and also setting correct permissions as seen below:

    # cp /usr/local/psa/admin/conf/panel.ini.sample /usr/local/psa/admin/conf/panel.ini

    # chmod 644 /usr/local/psa/admin/conf/panel.ini

  4. After that, we will regenerate Apache configuration files by executing this command:
    # plesk sbin httpdmng --reconfigure-all
  5. Next, restart nginx with this command:
    # service nginx restart

After following this process, we will be able to set up client_max_body_size for Nginx without running into any further trouble.

[Looking for a solution to another query? We are just a click away.]

Conclusion

To sum up, our skilled Support Engineers at Bobcares demonstrated what to do when cannot set up client_max_body_size for Nginx in Plesk.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.