LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > Mod expires not working

Reply
 
Thread Tools Display Modes
  #1  
Old 06-07-2012, 07:02 AM
Yogesh Sarkar Yogesh Sarkar is offline
Member
 
Join Date: May 2009
Posts: 42
Default Mod expires not working

I have an issue where mod expires is not working for any of my websites.

I have it enabled it globally in HTPPD.conf

<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A0
FileETag None
<FilesMatch "\.(gif|jpg|jpeg|png|js|css|ico|JPG)$">
ExpiresDefault "access plus 10 days"
Header append Cache-Control "public"
</FilesMatch>
</IfModule>

As well as in Litespeed configuration

Enable Expires Yes

Expires Default Not Set

Expires By Type image/*=A604800, text/css=A604800, application/x-javascript=A604800, application/javascript=A604800

Using PHP suEXEC and Litespeed dedicatedly with Load Apache Configuration set to Yes.
Reply With Quote
  #2  
Old 06-07-2012, 02:37 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
Can you elaborate the 'not working'? Does 'Expires' or 'Cache-Control' header not show up at all or something else?
Reply With Quote
  #3  
Old 06-07-2012, 08:20 PM
Yogesh Sarkar Yogesh Sarkar is offline
Member
 
Join Date: May 2009
Posts: 42
When I test my vbulletin forum using pagespeed or numerous other site testing tools, all of them tell me that the png files have no expiation specified.

I added png explicitly in the litespeed configuration, but to no avail.

You can check my site if you want at www.bcmtouring.com/forum/
Reply With Quote
  #4  
Old 06-08-2012, 10:50 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
what is your LSWS version? do you have anything in .htaccess override the expires? also, remove 'image/*=A604800' from lsws config and see if apache defined 'ExpiresDefault "access plus 10 days"' is effective for png.
Reply With Quote
  #5  
Old 06-08-2012, 12:53 PM
Yogesh Sarkar Yogesh Sarkar is offline
Member
 
Join Date: May 2009
Posts: 42
4.1.12 and nothing in .htaccess, because vbseo rules are loaded in httpd.conf.

Removed the image/*=A604800 from the LSWS config and didn't make any difference.
Reply With Quote
  #6  
Old 06-08-2012, 02:53 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
unable to reproduce your issue in our lab. try comment out the mod_expires section in httpd.conf and see any difference.
Reply With Quote
  #7  
Old 06-08-2012, 04:46 PM
Yogesh Sarkar Yogesh Sarkar is offline
Member
 
Join Date: May 2009
Posts: 42
Removed mod_expires and it made no difference. Could it be that this module isn't loaded?
Reply With Quote
  #8  
Old 06-08-2012, 04:54 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
Looks good to me.

~$ curl -I http://www.bcmtouring.com/forum/images/icons/icon6.png
HTTP/1.1 200 OK
Date: Fri, 08 Jun 2012 23:53:38 GMT
Server: LiteSpeed
Accept-Ranges: bytes
Connection: Keep-Alive
Keep-Alive: timeout=5, max=100
ETag: "324-4fc95ad6-0"
Last-Modified: Sat, 02 Jun 2012 00:14:14 GMT
Content-Type: image/png
Content-Length: 804
Cache-Control: max-age=604800
Expires: Fri, 15 Jun 2012 23:53:38 GMT
Reply With Quote
  #9  
Old 06-08-2012, 04:57 PM
Yogesh Sarkar Yogesh Sarkar is offline
Member
 
Join Date: May 2009
Posts: 42
Yes it just started working, after I individually listed image mime types in litespeed.

Thanks .
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:07 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.