I followed the advice here to configure the nginx reverse proxy to allow files larger than the default 1mb. So, my code in
/.platform/nginx/conf.d/prod.conf
looks like this:
http {
client_max_body_size 30M;
}
However, this seems to have no effect, and nginx still registers an error when I try to upload a file larger than 1mb.
I also tried doing this without the http
and braces, as detailed in the accepted answer to this question, like this:
client_max_body_size 30M;
This also had no effect.
I thought it might be necessary to restart nginx after applying the configuration, so I added a file in the .ebextensions directory called 01nginx.config
, which looks like this:
commands:
01_reload_nginx:
command: "sudo service nginx reload"
This also had no effect.
I have seen this question and the above-referenced question, as well as this one. However, they all seem either outdated or non-applicable to an Amazon Linux 2 instance, since none of them mention the .platform
directory from the above-referenced elastic beanstalk documentation. In any case, none of their answers have worked for me thus far. So, what am I missing?