Allow large file download in Nginx/PHP
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