I ma getting 403 request entity too large
when I try to upload a file of more than 1 mb on elastic beanstalk.
I tried to add my configuration in the .platform/nginx/conf.d/proxy.conf
file. here is the file content
client_max_body_size 200M;
I followed the advice here to configure the nginx reverse proxy to allow files larger than the default 1MB.
I tried to create a .config
file in the .ebextenstions
. file content look like this
files: "/etc/nginx/conf.d/proxy.conf" : mode: "000755" owner: root group: root content: | client_max_body_size 200M; commands: 01_reload_nginx: command: "service nginx reload"
Also tried everything mentioned on this answer here
I tried to access the Ec2 instance via terminal and manually add client_max_body_size 200M;
in the etc/nginx/nginx.conf
file. this worked but the problem is whenever we deploy the new version on beanstalk this will update the nginx configuration and have to follow the same instructions again after every deployment as Beanstalk also warn the same thing.enter image description here