It appears mod_expires setting in .htaccess are not working despite EasyApache 4 config shows mod_expires is installed?
GtMetrix and Google Pagespeed tests are both showing expiration of 1 day for jpeg images for example despite these settings in public_html/.htaccess
Is there a WHM/Cpanel setting I'm missing or am I mistaken that mod_expires is installed and running?
In one command I used, it shows up:
[[email protected] public_html]# apachectl -M|grep expires
expires_module (shared)
In another it doesn't:
[[email protected] public_html]# httpd -l
Compiled in modules:
core.c
mod_so.c
http_core.c
I'm guessing httpd -l isn't the proper command? (I'm running Centos 6)
GtMetrix and Google Pagespeed tests are both showing expiration of 1 day for jpeg images for example despite these settings in public_html/.htaccess
Code:
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/javascript "access 1 month"
ExpiresByType application/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 2 days"
</IfModule>
## EXPIRES CACHING ##
In one command I used, it shows up:
[[email protected] public_html]# apachectl -M|grep expires
expires_module (shared)
In another it doesn't:
[[email protected] public_html]# httpd -l
Compiled in modules:
core.c
mod_so.c
http_core.c
I'm guessing httpd -l isn't the proper command? (I'm running Centos 6)
Last edited by a moderator: