nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

lighttpd mod_expire how to check it's work

This is a discussion on lighttpd mod_expire how to check it's work within the Web servers forums, part of the Mastering Servers category; hello I have got this config (with mod_expire activated) Code: expire.url = ( "*.js" => "access 7 days", "*.css" => ...


Go Back   nixCraft Linux Forum > Mastering Servers > Web servers

Linux answers from nixCraft.


Web servers Discussion on Apache, Nginx and Lighttpd HTTP/web server and configuration issues.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-25-2008, 05:08 PM
Junior Member
User
 
Join Date: May 2008
OS: Debian
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
mumuri is on a distinguished road
Default lighttpd mod_expire how to check it's work

hello

I have got this config (with mod_expire activated)

Code:
expire.url = (
                  "*.js"     => "access 7 days",
                  "*.css"    => "access 7 days",
                  "*.gif"    => "access 7 days",
                  "*.jpg"    => "access 7 days",
               )
when i do a curl -I , i got this result, but there is no cache-control tag ? is it normal ? how can i check that the mod works well

Code:
curl -I http://forum.topflood.com/themes/forums/style/style.css
HTTP/1.1 200 OK
Content-Type: text/css
Accept-Ranges: bytes
ETag: "-1348294228"
Last-Modified: Tue, 24 Jun 2008 21:49:02 GMT
Content-Length: 4955
Date: Wed, 25 Jun 2008 11:37:30 GMT
Server: lighttpd/1.4.19

thanks in advance
Reply With Quote
  #2 (permalink)  
Old 06-25-2008, 05:23 PM
rockdalinux's Avatar
Is that all you got?
User
 
Join Date: May 2005
Location: Planet Vegeta
OS: Redhat
Posts: 703
Thanks: 15
Thanked 19 Times in 18 Posts
Rep Power: 10
rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light
Default

I think your regex is not correct, update it as follows
Code:
$HTTP["url"] =~ "\.(jpg|gif|png|css|js)$" {
     expire.url = ( "" => "access 7 days" )
}
Reload lighttpd again:
Code:
service lighttpd restart
curl -I  http://forum.topflood.com/themes/forums/style/style.css | grep Cache
You also need to Etags, if you are not using load balanced setup by adding following lines:
Code:
etag.use-inode = "enable"
etag.use-mtime = "enable"
etag.use-size = "enable"
static-file.etags = "enable"
__________________
Rocky Jr.
What's wrong? I hope I am not making you uncomfortable...

Never send a boy to do a mans job.
Reply With Quote
  #3 (permalink)  
Old 06-25-2008, 05:35 PM
Junior Member
User
 
Join Date: May 2008
OS: Debian
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
mumuri is on a distinguished road
Default

thank you for the reply ,i did like you ve said and it's work

thanks
Reply With Quote
Reply

Tags
etags , mod_expire


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Do you use Linux to do your everyday work? charvi The Hangout 19 12-06-2009 09:08 AM
old server.error-handler-404 doesn't work anymore muks Web servers 5 08-29-2007 01:29 PM
How to check md5 hash raj Linux software 3 08-17-2007 05:34 AM
will this work? mudfish Shell scripting 0 03-28-2007 12:02 PM
Linux usb keyboard does not work jerry Linux software 3 04-05-2006 09:21 PM


All times are GMT +5.5. The time now is 02:03 AM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2009 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38