','

' ); } ?>

Como activar leverage browser caching en Plesk

Login server via SSH.

Encuentra la ruta de LoadModule:

# find / -name mod_expires.so /usr/lib64/httpd/modules/mod_expires.so

Crea el siguiente fichero de configuración

Para CentOS/CloudLinux/RHEL – /etc/httpd/conf.d/expires.conf

 # vi /etc/httpd/conf.d/expires.conf

Para Debian/Ubuntu – /etc/apache2/conf.d/expires.conf

# vi /etc/apache2/conf.d/expires.conf

Añade el siguiente contenido:

Para CentOS/CloudLinux/RHEL:

LoadModule expires_module modules/mod_expires.so
ExpiresActive on
ExpiresDefault "access plus 14 days"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType text/css "now plus 1 month"
ExpiresByType image/ico "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 month"
ExpiresByType text/html "access plus 1 days"

Para Debian/Ubuntu:

LoadModule expires_module /usr/lib/apache2/modules/mod_expires.so
ExpiresActive on
ExpiresDefault "access plus 14 days"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType text/css "now plus 1 month"
ExpiresByType image/ico "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 month"
ExpiresByType text/html "access plus 1 days"

Añade lo siguiente en  /etc/httpd/conf/httpd.conf or /etc/apache2/apache2.conf:

FileETag None 

Aplica los cambios en el servidor web:

Para CentOS/CloudLinux/RHEL:

# service httpd reload

Para Debian/Ubuntu

# service apache2 reload

Valida la configuración en Apache

Para CentOS/CloudLinux/RHEL

# httpd -t

Para Debian/Ubuntu

# apache2ctl -t

Comprueba los módulos en  Apache:

# httpd -M

or

# apache2ctl -M