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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠