Apache Error: “Invalid command ‘ExpiresActive’”

  Linux

Error Apache : [Sun Jan 24 11:53:18.562178 2016] [core:alert] [pid 8772:tid 139888041072384] [client XX.XX.XX.XXX:46035] /var/www/vhosts/***********.com/httpdocs/.htaccess: Invalid command ‘ExpiresActive’, perhaps misspelled or defined by a module not included in the server configuration, referer: http://**********.com/

Si se os reproduce el mensaje anterior en el log de error de Apache junto con un mensaje de error de “Internal Sever Error 500”, significa que estas utilizando el comando ExpiresActive en un fichero .htaccess o en el fichero de configuración de Apache (apache2.conf o https.conf) sin habilitar el módulo Expires.

La solución para este error simplemente sería ejecutar el siguiente comando:

ln -s /etc/apache2/mods-available/expires.load /etc/apache2/mods-enabled/

Por último reiniciamos Apache para que repliquen los cambios:

service apache2 restart

2 thoughts on - Apache Error: “Invalid command ‘ExpiresActive’”

LEAVE A COMMENT