DietPi-Software | nginx maximum upload size

Created on 4 Oct 2016  ·  3Comments  ·  Source: MichaIng/DietPi

After upgrading to v132, I tried out Pydio with a nginx webserver backend, and I encountered an error (413 request entity too large) when uploading files larger than 2MB. It appears to be a bug (or a feature if you look at it that way) in the nginx configuration. Editing /etc/nginx/nginx.conf to have client_max_body_size 8796093022207M; in the http section fixed the problem. I was running this on the pine64, hence the size, copied from the php.ini upload max! ;-)

Bug Enhancement

Most helpful comment

No worries... thanks for the quick patch! :D I was hoping you'd use the PHP max upload size value for that also! 👍

All 3 comments

@pfeerick

Great find, thanks for letting us know 👍 I'll add that into the nginx conf by default.

Confirmed with NextCloud + Nginx. client_max_body_size must be set, else, 2MB upload limit.

Ok, done.

client_max_body_size will be set to same value as php_max_upload_size="$(( $(php -r 'print(PHP_INT_MAX);') / 1024 / 1024))M"

Thanks again @pfeerick , great stuff 👍

No worries... thanks for the quick patch! :D I was hoping you'd use the PHP max upload size value for that also! 👍

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Fourdee picture Fourdee  ·  3Comments

pgferr picture pgferr  ·  3Comments

MichaIng picture MichaIng  ·  3Comments

and09 picture and09  ·  3Comments

oshank picture oshank  ·  3Comments