Recommended sites

Add to MyYahoo!
Subscribe in NewsGator Online
Add to Newsburst
Add to Google
Add to My AOL
Add to Pluck
Subscribe in FeedLounge
Add to Windows Live
Add to NetVibes
Subscribe in Rojo
Subscribe in Bloglines
Add to MyMSN
Add to Plusmo for your cellphone
Add to PageFlakes
Add to Technorati
Add to BlinkBits
Speed up your apache server with mod_expires Print E-mail
User Rating: / 0
PoorBest 
Sunday, 30 September 2007 20:18

This module controls the setting of the Expires HTTP header and the max-age directive of the Cache-Control HTTP header in server responses. The expiration date can set to be relative to either the time the source file was last modified, or to the time of the client access.

These HTTP headers are an instruction to the client about the document's validity and persistence. If cached, the document may be fetched from the cache rather than from the source until this time has passed. After that, the cache copy is considered "expired" and invalid, and a new copy must be obtained from the source.

How to activate mod_expires.so
# vi /etc/apache2/conf.d/mod_expires.conf

config is rough right now, but it is better than nothing,put the following in the file

LoadModule evasive20_module     /usr/lib/apache2/mod_expires.so
<IfModule mod_expires.c>
 ExpiresActive On

 ExpiresDefault "access plus 1 month"
 #ExpiresByType text/html "access plus 1 month 15 days 2 hours"
 #ExpiresByType image/gif "modification plus 1 month"
 #ExpiresByType image/png "modification plus 1 month"
 #ExpiresByType image/jpg "modification plus 1 month"
 #ExpiresByType text/css "access plus 1 month 15 days 2 hours"
 #ExpiresByType text/javascript "access plus 1 month 15 days 2 hours"
</IfModule>

You can also set the expire header by type, but it wa snot working in my case, that is why I use the ExpiresDefault directive

Comments
Add New Search RSS
Write comment
Name:
Email:
 
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
:):grin;)8):p:roll:eek:upset:zzz:sigh:?:cry
:(:x
Please input the anti-spam code that you can read in the image.

3.20 Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

 


Another articles:


Content View Hits : 2417105

Enter Amount: