[LON-CAPA-cvs] cvs: loncom / loncapa_apache.conf

droeschl droeschl@source.lon-capa.org
Thu, 18 Feb 2010 16:54:53 -0000


droeschl		Thu Feb 18 16:54:53 2010 EDT

  Modified files:              
    /loncom	loncapa_apache.conf 
  Log:
  Introduced Apache Directive to send proper expires header for static content. 
  This change avoids unnessesary HTTP requests being sent by browsers. 
  Caching is set to 12 hours.
  This might avoid the need for a lightweight webserver.
  
  
Index: loncom/loncapa_apache.conf
diff -u loncom/loncapa_apache.conf:1.190 loncom/loncapa_apache.conf:1.191
--- loncom/loncapa_apache.conf:1.190	Mon Nov 30 21:37:19 2009
+++ loncom/loncapa_apache.conf	Thu Feb 18 16:54:53 2010
@@ -1,7 +1,7 @@
 ##
 ## loncapa_apache.conf -- Apache HTTP LON-CAPA configuration file
 ##
-## $Id: loncapa_apache.conf,v 1.190 2009/11/30 21:37:19 raeburn Exp $
+## $Id: loncapa_apache.conf,v 1.191 2010/02/18 16:54:53 droeschl Exp $
 ##
 
 #
@@ -55,6 +55,12 @@
 PerlAuthenHandler	'sub { return OK }' 
 </LocationMatch>
 
+# Send proper expires header to avoid unnecessary HTTP request for static content
+<LocationMatch "^(/adm/lonIcons|/adm/jQuery|/adm/jsMath|/res/adm/pages)">
+        ExpiresActive On
+        ExpiresDefault "access plus 12 hours"
+</LocationMatch>
+
 <LocationMatch "^/+res.*">
 
 AuthType LONCAPA