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

173
Vistas
Elastic Beanstalk Django Nginx Cache Images

I've deployed an Elastic Beanstalk application and it is using nginx instead of Apache. I would really like to have browser image caching working but I can not find anything online about setting the caching headers with nginx. This was much easier with Apache. Any pointers?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Breaking this into two problems.

  1. Extending AWS Elastic Beanstalk platform configurations for nginx
  2. Configuring nginx

1. Extending AWS Elastic Beanstalk platform configurations for nginx

Within your application deployment to AWS Elastic Beanstalk, you can include an .ebextensions directory containing configuration files, including nginx related .conf files.

For your scenario, that could look like:

~/my-applicaiton/
|-- .ebextensions
|   `-- nginx
|       `-- conf.d
|           `-- image_caching.conf

You'll want to .zip this along with your deployment bundle ensuring the .ebextensions directory is at the root of the .zip.

Resources:

  • https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions.html
  • https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/java-se-nginx.html

2. Configuring nginx

Once you've introduced the .ebextensions extension of the existing nginx configuration, you'll be focusing on how nginx can be configured to add the necessary Headers for browser caching to apply to assets.

This other answer may give you more insights on how to configure the location and expiry per asset for nginx.

https://serverfault.com/a/334871

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