while we're at it, condense the js/css/images deflat and cache control into 1 block
authorberick <berick@esilibrary.com>
Fri, 18 Feb 2011 14:14:18 +0000 (09:14 -0500)
committerberick <berick@esilibrary.com>
Fri, 18 Feb 2011 14:14:18 +0000 (09:14 -0500)
Open-ILS/examples/apache/eg_vhost.conf

index 194696c..cd263bb 100644 (file)
@@ -169,26 +169,6 @@ RewriteRule . - [E=locale:%1]
 
 </Location>
 
-<Location /js/>
-    # ----------------------------------------------------------------------------------
-    # Some mod_deflate fun
-    # ----------------------------------------------------------------------------------
-    <IfModule mod_deflate.c>
-        SetOutputFilter DEFLATE
-
-        BrowserMatch ^Mozilla/4 gzip-only-text/html
-        BrowserMatch ^Mozilla/4\.0[678] no-gzip
-        BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
-
-        SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
-
-        <IfModule mod_headers.c>
-            Header append Vary User-Agent env=!dont-vary
-        </IfModule>
-    </IfModule>
-
-</Location>
-
 # ----------------------------------------------------------------------------------
 # Force SSL on the OPAC's "My Account" page
 # ----------------------------------------------------------------------------------
@@ -554,20 +534,32 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
         BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
         SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
         <IfModule mod_headers.c>
+            Header append Cache-Control "public"
             Header append Vary User-Agent env=!dont-vary
         </IfModule>
     </IfModule>
 </Location>
+<LocationMatch ^/(images|css|js)/>
+    # should pick up the default expire time from eg.conf...
+    <IfModule mod_deflate.c>
+        SetOutputFilter DEFLATE
+        BrowserMatch ^Mozilla/4 gzip-only-text/html
+        BrowserMatch ^Mozilla/4\.0[678] no-gzip
+        BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
+        SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
+        <IfModule mod_headers.c>
+            Header append Cache-Control "public"
+            Header append Vary User-Agent env=!dont-vary
+        </IfModule>
+    </IfModule>
+</LocationMatch>
 <Location /eg/opac>
     PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGCatLoader"
     # Expire the HTML immediately since we're loading dynamic data for each page
     ExpiresActive On
     ExpiresByType text/html "access plus 0 seconds"
 </Location>
-<LocationMatch ^/(images|css|js)/>
-    # should pick up the default expire time...
-    Header append Cache-Control "public"
-</LocationMatch>
+
 
 # Note: the template processor will decline handling anything it does not
 # have an explicit configuration for, which means it will fall back to