daria-vcl / BulletinMathematiquePlugin

0 stars 0 forks source link

Increase NGINX file upload size limit in production deployment #4

Closed GabrielMajeri closed 1 year ago

GabrielMajeri commented 1 year ago

Not related to the plugin's code per se, but Loredana encountered the following issue while testing the application in production:

image

This error is given by NGINX, which by default enforces a file upload size limit of 1 MiB. We should increase it to some more reasonable value (e.g. 16 MiB). See this SO answer on how it can be done through the config (we should add it to our site's config file).

GabrielMajeri commented 1 year ago

Fixed this by adding

client_max_body_size 16M;

to the server block in the /etc/nginx/sites-available/default config file.

There is still a 2 MiB limit imposed by the OJS settings, but at least it informs the user nicely about it.