I had a Spring Boot Application and it was deployed in the AWS Elastic beanstalk (Tomcat server). It was a war deployment.
I need to change the Nginx configuration. Need to add client_max_body_size 50M;
to the configuration. While checking the AWS Documentation found a way to modify the configuration via placing config file in .platform/nginx
location in the project root. I tried and it was not working.
Then I found these files are not picking while war creation. I can explain the build process too.
- Code build will generate the war file
- Uploading this war to S3
- Creating Application version (By uploading this war to the ELB)
- Pointing the that version to the elastic beanstalk environment.
Can anyone help me to find a solution to change the nginx config in ELB for war deployment?
Thank in advance!
CodePudding user response:
If you are using Amazon Linux version 2, you need to put nginx config into following path:
.platform/nginx/conf.d/config.conf
If you are using Amazon Linux version 1, location should be:
.ebextensions/nginx/conf.d/config.conf
This folder (.platform/.ebextension) should be inside Zip file (which contains your war/jar and this .platform/.ebextension folder) to work.