Spring Boot deployed on Elastic Beanstalk. Need to modify Ngnix to allow large files

1

Hi, I am trying to upload larger files but because of default 1MB limitation, Ngnix is not letting the request go through. I tried adding .platform or .ebextensions with a conf file specifying client_max_body_size 100M but it did not work.

I am using Spring Boot 2.6.4 version and deployed as a Jar file using Java (JDK11) in elastic beanstalk. Can you please help me on what can be done to make sure that Ngnix can allow large files? Very much appreciate your help. Thank you.

With gratitude, Jeelani

asked 2 years ago431 views
1 Answer
-1

Hi, please go through below steps & see if it helps.

  1. Edit the <<nginx-home>>/nginx.conf file to increase the limit of the files to upload:

http: http { ... client_max_body_size 100M; }

server: server { ... client_max_body_size 100M; }

location: location /uploads { ... client_max_body_size 100M; }

  1. Save the file and restart the NGINX webserver to apply the changes
shethap
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions