From 532cc68ebf857a21e4b6c0a1b3ca0c569636ebe2 Mon Sep 17 00:00:00 2001 From: miker Date: Fri, 10 Sep 2010 20:13:05 +0000 Subject: [PATCH] use mod_deflate when and where we can (opac, and not in IE, basically) git-svn-id: svn://svn.open-ils.org/ILS/trunk@17593 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/apache/eg_vhost.conf | 70 ++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf index da999b318..116fd82d4 100644 --- a/Open-ILS/examples/apache/eg_vhost.conf +++ b/Open-ILS/examples/apache/eg_vhost.conf @@ -128,6 +128,65 @@ RewriteRule - - [E=locale:%1] [L] + + # ---------------------------------------------------------------------------------- + # Some mod_deflate fun + # ---------------------------------------------------------------------------------- + + 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 + + + Header append Vary User-Agent env=!dont-vary + + + + + + + # ---------------------------------------------------------------------------------- + # Some mod_deflate fun + # ---------------------------------------------------------------------------------- + + 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 + + + Header append Vary User-Agent env=!dont-vary + + + + + + + # ---------------------------------------------------------------------------------- + # Some mod_deflate fun + # ---------------------------------------------------------------------------------- + + 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 + + + Header append Vary User-Agent env=!dont-vary + + + + # ---------------------------------------------------------------------------------- # Force SSL on the OPAC's "My Account" page @@ -472,4 +531,15 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT] SetHandler None +# ---------------------------------------------------------------------------------- +# Some mod_deflate logging setup +# ---------------------------------------------------------------------------------- + + DeflateFilterNote Input instream + DeflateFilterNote Output outstream + DeflateFilterNote Ratio ratio + + LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate + CustomLog /var/log/apache2/deflate_log deflate + -- 2.11.0