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

202
Visualizações
AWS python Flask EB .ebextensions .conf file is not working

.conf file

files:
  "/etc/nginx/conf.d/01_proxy.conf":
    mode: "000644"
    owner: root
    group: root
    content: |
      client_max_body_size 200M;

container_commands:                         
  01_reload_nginx:                           
    command: "sudo nginx -s reload"

I have put this file in all possible folders:

.ebextensions
|-- 01_nginx.conf
|
|--nginx
   |--01_nginx.conf
   |--conf.d
      |--01_nginx.conf

when I check the log, the first message is

2020/07/31 18:23:59.603405 [INFO] Finished executing the config set Infra-EmbeddedPostBuild.

then

2020/07/31 18:23:59.603427 [INFO] Executing instruction: CleanEbExtensions

In theory when .ebextensions is cleant the custom commands should already have been executed, but they are not (when I connect via ssh to the server no file has been created as well as if I try to upload files, the server responds with a 413).

I have also tried modifying the nginx.conf file in /etc/nginx/ but it is reset everytime I update the code. All the /etc/nginx/ directory seems to be reset because I have also tried to put a "000_custom.conf" file in "/etc/nginx/conf.d/", but with no results.

Edit: I'd like to point out that if I modify nginx.conf in "/etc/nginx/" on the server and I do a "sudo nginx -s reload" it works till the next code build.

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

0

The likely reason why your nginx config does not work is that you are using current version of EB which is based on Amazon Linux 2 (AL2). However, your nginx config files are for AL1, which is old.

For AL2, nginx settings should be in .platform, not in .ebextentions as shown in the docs.

Therefore, you could try creating file .platform/nginx/conf.d/mynginx.conf with the content of:

client_max_body_size 200M;
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