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

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

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