Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

200
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda