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

284
Visualizações
Can't enable cache control on apache server

I am running a AWS Lightsail Bitnami instance with Wordpress installed. I am trying to enable Cache Control. I have tried adding these directives to the .htaccess file:

# 1 YEAR
<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|woff|woff2|ttf|eot)$">
Header set Cache-Control "max-age=31536000, public"
</FilesMatch>

# 1 WEEK
<FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>

# 1 WEEK
<FilesMatch "\.(txt|xml|js|css)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>

I have also tried uncommenting this line in httpd.conf: LoadModule expires_module modules/mod_expires.so I added a expires.conf file in the /opt/bitnami/apache2/conf folder. I added this code:

<IfModule mod_expires.c>
  ExpiresActive on

  ExpiresByType image/jpg “access plus 60 days”
  ExpiresByType image/png “access plus 60 days”
  ExpiresByType image/js “access plus 60 days”
  ExpiresByType image/jpeg “access plus 60 days”
  ExpiresByType text/css “access plus 1 days”
</IfModule>

I restarted the apache server after these changes. My files are still not being cached. The Lightsail instance comes preconfigured with pagespeed as well.

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

0

Bitnami Engineer here,

The Bitnami stacks don't use the information in the .htaccess files due to security and performance reasons. To do so, we configure Apache with "AllowOverride None" and create a htaccess.conf file inside the /opt/bitnami/apps/wordpress/conf. If you want to include any custom configuration in your app, you will need to edit that file.

You can find more information here:

https://docs.bitnami.com/aws/apps/wordpress/administration/use-htaccess/

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