NOTE: We're working on a configuration panel so that you can edit your configs right from Moss. In the meantime, you must follow the guidelines in this article.

In many cases you allow your users to upload content through your application. In this article you'll see how to set the maximum upload size to the value that fits your needs.

In this example we'll increase the limit up to 256 MB from the default 128 MB limit [*]. But first, take a quick look to the basics about fine-tuning your applications with Moss if you haven't done it yet.

For the sake of simplicity, in the remainder of this article we provide examples for PHP 7.0. However everything stated here applies to all supported PHP versions. Just substitute 7.0 for the PHP version you're actually tweaking.

[*] Sites created before August 27, 2019 have a 10 MB limit by default.

PHP-FPM configuration

  1. Log into your server as user moss: ssh moss@<server-ip> 
  2. Using sudo and your favorite text editor, create file /etc/php/7.0/fpm/conf.d/99-extra.ini (or a similar one) with the following content:
upload_max_filesize = 256M
post_max_size = 256M

3. Restart PHP-FPM from the Software tab

Nginx configuration

  1. Log into your server as user moss: ssh moss@<server-ip> 
  2. Using sudo and your favorite text editor, add the following line to file /etc/openresty/server_params.<site-name>:
client_max_body_size 256m;

3. Restart Nginx from the Software tab

Did this answer your question?