I have been trying to increase the client_max_body_size for the provided Nginx server in my Java 11 Beanstalk deployment without success.
So far I have tried the AWS Developer Guide method, this approach in GitHub using a hook, as well as every posted solution I found in this StackOverflow question using different configurations in the .ebextenstions.
The errors I have faced are different depending on the approach I take, from the app not being deployed at all because of errors in the Nginx configuration to the app being deployed successfully but not taking the new file size limit into account. These are some of the bundle structures I have tried:
Bundle 1
myBundle.zip
--myApplication.jar
--Procfile
--.ebextensions
----nginx
------conf.d
--------proxy.conf
proxy.conf
client_max_body_size 50M;
Bundle 2
myBundle.zip
--myApplication.jar
--Procfile
--.ebextensions
----myconf.config
myconf.config
files:
"/etc/nginx/conf.d/proxy.conf" :
mode: "000755"
owner: root
group: root
content: |
client_max_body_size 50M;
container_commands:
01_reload_nginx:
command: "sudo service nginx reload"
Bundle 3
myBundle.zip
--myApplication.jar
--Procfile
--.ebextensions
----myhookconfig.config
myhookconfig.config
files:
"/opt/elasticbeanstalk/hooks/appdeploy/enact/12_add_nginx_configuration.sh":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
/bin/echo "client_max_body_size 50M;" > /etc/nginx/conf.d/proxy.conf
/sbin/service nginx reload
I presume this may have something to do with the EB Java 11 platform in specific. Have you guys accomplished to change this configuration in EB with Java 11? Thanks!