Modify the NGINX file upload limit

Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and Mac OS X) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). Learn more.

The maximum size for uploaded files is set to 1 MB by default in the NGINX configuration. You can add the following option at the end of this file installdir/apps/APP_NAME/conf/nginx-app.conf to increase the allowed size for uploads. Replace the APP_NAME placeholder with the correct directory name.

client_max_body_size SIZE;

NOTE: Remember to replace the SIZE placeholder with the value you want to set. For example: client_max_body_size 8m;.

  • Restart PHP-FPM and NGINX for the changes to take effect.

    $ sudo installdir/ restart nginx $ sudo installdir/ restart php-fpm

Last modification September 5, 2018