Changes between Initial Version and Version 1 of sysadminApacheConfiguration


Ignore:
Timestamp:
Jun 12, 2009, 9:32:50 AM (13 years ago)
Author:
Dan Scott
Comment:

Document caching changes

Legend:

Unmodified
Added
Removed
Modified
  • sysadminApacheConfiguration

    v1 v1  
     1= Apache server configuration =
     2
     3== Static vs. dynamic content ==
     4Right now, our Apache servers are serving up all of the static content (images, javascript, etc) as well as OpenSRF dynamic content. By default, those Apache processes serve up 1000 requests, then get killed off and respawned (to avoid memory leaks).
     5
     6Eventually, I would be interested in moving in a direction like [http://article.gmane.org/gmane.education.libraries.open-ils.devel/3189 using nginx to proxy static content].
     7
     8== Avoiding too-long caching of changed files ==
     9We were seeing that some browsers were retaining cached versions of files for a long time, even though we had changed the !JavaScript to, say, group formats and editions (or not). The default caching period for most content was one week. So one pertinent change to the default configuration for expiring content in /etc/apache/sites-available/eg.conf that Dan made on 2009-06-12 was as follows:
     10{{{
     11# ----------------------------------------------------------------------------------
     12# OPTIONAL: Set how long the client will cache our content.  Change to suit
     13# ----------------------------------------------------------------------------------
     14ExpiresActive On
     15# The defaults
     16#ExpiresDefault A2592000
     17#ExpiresByType text/html A64800
     18#ExpiresByType application/xhtml+xml A64800
     19#ExpiresByType application/x-javascript A64800
     20#ExpiresByType text/css A3000
     21
     22# From one month to 1 week
     23ExpiresDefault "access plus 1 week"
     24# From one week to 1 day, staggering a bit to avoid reloading everything in one fell swoop
     25ExpiresByType text/html "access plus 25 hours"
     26ExpiresByType application/xhtml+xml "access plus 25 hours"
     27ExpiresByType application/x-javascript "access plus 24 hours"
     28ExpiresByType text/css "access plus 23 hours"
     29}}}