Allow large file download in Nginx/PHP

Revision as of 08:43, 21 September 2017 by 78.98.219.123 (talk) (Created page with "Both nginx and PHP settings need to be amended: /etc/nginx/nginx.conf (http directive): add '''client_max_body_size 100M;''' /etc/nginx/sites-available/<relevant site conf...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Both nginx and PHP settings need to be amended:

/etc/nginx/nginx.conf (http directive):

add client_max_body_size 100M;

/etc/nginx/sites-available/<relevant site conf file>

both server and location / directives:

add client_max_body_size 100M;

/etc/php/7.0/fpm/php.ini (amend this if different php version)

add or amend these values:

max_execution_time = 5000

memory_limit = 1024M

upload_max_filesize = 100M

post_max_size = 32M

then restart nginx and php fpm