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

已提问 2 年前438 查看次数
1 回答
-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
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则