summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-08-28 12:36:45 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-08-28 12:41:06 +0200
commit9d82f7e53e66e5594b0c8b82f6c415a0a386b580 (patch)
treeef263c99ec2f13a9d926b8c4304d5c19466fa210 /nixos
parent77354ebacd57cf43590b5f658ab777b533d7cc0f (diff)
downloadnixpkgs-9d82f7e53e66e5594b0c8b82f6c415a0a386b580.tar
nixpkgs-9d82f7e53e66e5594b0c8b82f6c415a0a386b580.tar.gz
nixpkgs-9d82f7e53e66e5594b0c8b82f6c415a0a386b580.tar.bz2
nixpkgs-9d82f7e53e66e5594b0c8b82f6c415a0a386b580.tar.lz
nixpkgs-9d82f7e53e66e5594b0c8b82f6c415a0a386b580.tar.xz
nixpkgs-9d82f7e53e66e5594b0c8b82f6c415a0a386b580.tar.zst
nixpkgs-9d82f7e53e66e5594b0c8b82f6c415a0a386b580.zip
Revert "Apache service module: allow compression"
This reverts commit 164f6ff2a8485c1130cd710992a6084258cdad28 per
https://github.com/NixOS/nixpkgs/pull/9407#issuecomment-134523359
(it's too site-specific). Furthermore this should be an option at the
virtual host level.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/web-servers/apache-httpd/default.nix31
1 files changed, 1 insertions, 30 deletions
diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix
index e3f1a7fb1bd..7350a6a68c7 100644
--- a/nixos/modules/services/web-servers/apache-httpd/default.nix
+++ b/nixos/modules/services/web-servers/apache-httpd/default.nix
@@ -117,7 +117,6 @@ let
     ]
     ++ (if mainCfg.multiProcessingModule == "prefork" then [ "cgi" ] else [ "cgid" ])
     ++ optional enableSSL "ssl"
-    ++ optional mainCfg.enableCompression "deflate"
     ++ extraApacheModules;
 
 
@@ -177,27 +176,6 @@ let
     SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5:!EXP
   '';
 
-  # From http://paulstamatiou.com/how-to-optimize-your-apache-site-with-mod-deflate/
-  compressConf = ''
-    SetOutputFilter DEFLATE
-
-    # Don't compress binaries
-    SetEnvIfNoCase Request_URI .(?:exe|t?gz|zip|iso|tar|bz2|sit|rar) no-gzip dont-vary
-    # Don't compress images
-    SetEnvIfNoCase Request_URI .(?:gif|jpe?g|jpg|ico|png)  no-gzip dont-vary
-    # Don't compress PDFs
-    SetEnvIfNoCase Request_URI .pdf no-gzip dont-vary
-    # Don't compress flash files (only relevant if you host your own videos)
-    SetEnvIfNoCase Request_URI .flv no-gzip dont-vary
-    # Netscape 4.X has some problems
-    BrowserMatch ^Mozilla/4 gzip-only-text/html
-    # Netscape 4.06-4.08 have some more problems
-    BrowserMatch ^Mozilla/4.0[678] no-gzip
-    # MSIE masquerades as Netscape, but it is fine
-    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
-    # Make sure proxies don't deliver the wrong content
-    Header append Vary User-Agent env=!dont-vary
-  '';
 
   mimeConf = ''
     TypesConfig ${httpd}/conf/mime.types
@@ -373,7 +351,6 @@ let
     ${mimeConf}
     ${loggingConf}
     ${browserHacks}
-    ${optionalString mainCfg.enableCompression compressConf}
 
     Include ${httpd}/conf/extra/httpd-default.conf
     Include ${httpd}/conf/extra/httpd-autoindex.conf
@@ -446,7 +423,7 @@ in
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = "Enable the Apache HTTP Server.";
+        description = "Whether to enable the Apache HTTP Server.";
       };
 
       package = mkOption {
@@ -609,12 +586,6 @@ in
         description =
           "Maximum number of httpd requests answered per httpd child (prefork), 0 means unlimited";
       };
-
-      enableCompression = mkOption {
-        type = types.bool;
-        default = false;
-        description = "Enable compression of responses using mod_deflate.";
-      };
     }
 
     # Include the options shared between the main server and virtual hosts.