jazee

Well-Known Member
Jan 12, 2015
125
5
68
cPanel Access Level
Root Administrator
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
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 ##
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)
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,237
463
Hello,

Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

Thank you.