Project

General

Profile

Mod expire » History » Revision 6

Revision 5 (Anonymous, 2006-09-27 15:52) → Revision 6/22 (Anonymous, 2006-12-19 07:29)

{{{ 
 #!rst 
 =============================================== 
 Controlling the Expiration of Content in Caches 
 =============================================== 

 ------------------ 
 Module: mod_expire 
 ------------------ 

 .. meta:: 
   :keywords: lighttpd, expire 
  
 .. contents:: Table of Contents 

 Description 
 =========== 

 mod_expire controls the Expire header in the Response Header of HTTP/1.0 
 messages. It is useful usefull to set it for static files which should be cached  
 aggressively aggressivly like images, stylesheets or similar. 

 Options 
 ======= 

 expire.url 
   assigns assignes a expiration to all files below the specified path. The 
   specification of the time is made up of: :: 

     <access|modification> <number> <years|months|days|hours|minutes|seconds> 

   following the syntax used by mod_expire in Apache 1.3.x and later. 
    
   Example: :: 
    
     expire.url = ( "/images/" => "access 1 hours" ) 
  
   Example to include all sub-directories: :: 

     $HTTP["url"] =~ "^/images/" { 
          expire.url = ( "" => "access 1 hours" ) 
     } 

 Troubleshoot 
 ============ 

 It is known that mod_expire may not work due to an incorrect order of loading of modules. One instance is that mod_expire is loaded after mod_fastcgi. The solution is simple, it is to move mod_expire within the modules array in front of mod_fastcgi. Note: The order of the modules is loaded from top to bottom. 

 Symptoms of the above scenario is the server starts up fine but fails to serve content. 

 }}}