I keep getting the "413 Request Entity Too Large" error when uploading files that are larger than 1M. I followed the following instructions from here but it didn't work.
mkdir /home/dokku/myapp/nginx.conf.d/
echo 'client_max_body_size 50M;' > /home/dokku/myapp/nginx.conf.d/upload.conf
chown dokku:dokku /home/dokku/myapp/nginx.conf.d/upload.conf
service nginx reload
I tried updating my Procfile
adding a php.ini file to my root directory with the following entry but it also didn't help:
Procfile:
web: vendor/bin/heroku-php-nginx -C nginx.conf -i php.ini php/
php.ini:
upload_max_filesize = 100M
post_max_size = 100M
What am I doing wrong? Is there anyway to test if my configurations are being used or if they are being overwritten by something else? I checked phpinfo();
and those setting are being used, is there an equivalent to that for nginx?
Is there a way to change the nginx settings globally for all images?
nginx -T
on the machine where nginx is running – Detradetract