In Magento CE, I'd like to install an add-on to Extendware Page Cache called Lightening Cache.
It requires editing the Apache configuration inside the virtual host definition for the site, by adding:
RewriteEngine On
RewriteMap ewpchash prg:/home/.../shell/extendware/ewpagecache/apache/md5.php
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{REQUEST_URI} !\.(js|css|png|jpg|jpeg|ico|gif)$ [NC]
RewriteCond %{DOCUMENT_ROOT}%{SCRIPT_FILENAME} !-f
RewriteCond ${ewpchash:%{HTTPS};~;%{HTTP_HOST};~;%{REQUEST_URI};~;%{QUERY_STRING};~;%{HTTP:Cookie};~;%{SCRIPT_FILENAME};~;%{REMOTE_ADDR};~;%{HTTP_USER_AGENT}} -f
RewriteRule ^(.*)$ ${ewpchash:%{HTTPS};~;%{HTTP_HOST};~;%{REQUEST_URI};~;%{QUERY_STRING};~;%{HTTP:Cookie};~;%{SCRIPT_FILENAME};~;%{REMOTE_ADDR};~;%{HTTP_USER_AGENT}} [NC,L]
<FilesMatch "\.(html)$">
Header unset Cache-Control
Header unset Expires
Header append Expires "Thu, 19 Nov 1981 08:52:00 GMT"
Header append Cache-Control "must-revalidate"
</FilesMatch>
I have added this to the bottom of /etc/apache2/sites-enabled/site.conf
.
When I run the command apachectl graceful
, I receive the error:
AH00526: Syntax error on line 53 of /etc/apache2/sites-enabled/site.conf: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration Action 'graceful' failed. The Apache error log may have more information.
Site is running Apache 2.4
Have I done something wrong?
cd /etc/apache2/mods-enabled/; ln -s ../mods-available/headers.load headers.load
and then restart apache2. – Hortensehortensia