Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

577
Visualizações
Increase client_max_body_size for Nginx on AWS Elastic Beanstalk. Java 11

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!

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Here is the solution that worked for me. My mistake is that I was using the configuration for the preceding Amazon Linux 2 platforms. As Vaquar Khan mentions, the link with the correct configuration is this. The section Reverse Proxy Configuration is what I was looking for.

Here is the configuration that increased the NGINX request max body size:

myBundle.zip
--myApplication.jar
--Procfile
--.platform
----nginx
------conf.d
--------myConf.conf 

myConf.conf:

client_max_body_size 50M;
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda