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

175
Visualizações
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 Respostas
Responde à pergunta

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 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