configuration-templates – Diff between revs 3 and 4

Subversion Repositories:
Rev:
Only display areas with differencesRegard whitespace
Rev 3 Rev 4
1 ######################################################################## 1 ########################################################################
-   2 # Compression - compresses files for delivery. #
2 # deflate # 3 # Depends on Apache modules: #
-   4 # deflate, headers, setenvif, filter, mime #
3 ######################################################################## 5 ########################################################################
4   6  
5 <IfModule mod_deflate.c> 7 <IfModule mod_deflate.c>
6   8  
7 # Force compression for mangled `Accept-Encoding` request headers 9 # Force compression for mangled `Accept-Encoding` request headers
8 # https://developer.yahoo.com/blogs/ydn/pushing-beyond-gzipping-25601.html 10 # https://developer.yahoo.com/blogs/ydn/pushing-beyond-gzipping-25601.html
9   11  
10 <IfModule mod_setenvif.c> 12 <IfModule mod_setenvif.c>
11 <IfModule mod_headers.c> 13 <IfModule mod_headers.c>
12 SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding 14 SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
13 RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding 15 RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
14 </IfModule> 16 </IfModule>
15 </IfModule> 17 </IfModule>
16   18  
17 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 19 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
18   20  
19 # Compress all output labeled with one of the following media types. 21 # Compress all output labeled with one of the following media types.
20 # 22 #
21 # (!) For Apache versions below version 2.3.7 you don't need to 23 # (!) For Apache versions below version 2.3.7 you don't need to
22 # enable `mod_filter` and can remove the `<IfModule mod_filter.c>` 24 # enable `mod_filter` and can remove the `<IfModule mod_filter.c>`
23 # and `</IfModule>` lines as `AddOutputFilterByType` is still in 25 # and `</IfModule>` lines as `AddOutputFilterByType` is still in
24 # the core directives. 26 # the core directives.
25 # 27 #
26 # https://httpd.apache.org/docs/current/mod/mod_filter.html#addoutputfilterbytype 28 # https://httpd.apache.org/docs/current/mod/mod_filter.html#addoutputfilterbytype
27   29  
28 <IfModule mod_filter.c> 30 <IfModule mod_filter.c>
29 AddOutputFilterByType DEFLATE "application/atom+xml" \ 31 AddOutputFilterByType DEFLATE "application/atom+xml" \
30 "application/javascript" \ 32 "application/javascript" \
31 "application/json" \ 33 "application/json" \
32 "application/ld+json" \ 34 "application/ld+json" \
33 "application/manifest+json" \ 35 "application/manifest+json" \
34 "application/rdf+xml" \ 36 "application/rdf+xml" \
35 "application/rss+xml" \ 37 "application/rss+xml" \
36 "application/schema+json" \ 38 "application/schema+json" \
37 "application/vnd.geo+json" \ 39 "application/vnd.geo+json" \
38 "application/vnd.ms-fontobject" \ 40 "application/vnd.ms-fontobject" \
39 "application/x-font-ttf" \ 41 "application/x-font-ttf" \
40 "application/x-javascript" \ 42 "application/x-javascript" \
41 "application/x-web-app-manifest+json" \ 43 "application/x-web-app-manifest+json" \
42 "application/xhtml+xml" \ 44 "application/xhtml+xml" \
43 "application/xml" \ 45 "application/xml" \
44 "font/eot" \ 46 "font/eot" \
45 "font/opentype" \ 47 "font/opentype" \
46 "image/bmp" \ 48 "image/bmp" \
47 "image/svg+xml" \ 49 "image/svg+xml" \
48 "image/vnd.microsoft.icon" \ 50 "image/vnd.microsoft.icon" \
49 "image/x-icon" \ 51 "image/x-icon" \
50 "text/cache-manifest" \ 52 "text/cache-manifest" \
51 "text/css" \ 53 "text/css" \
52 "text/html" \ 54 "text/html" \
53 "text/javascript" \ 55 "text/javascript" \
54 "text/plain" \ 56 "text/plain" \
55 "text/vcard" \ 57 "text/vcard" \
56 "text/vnd.rim.location.xloc" \ 58 "text/vnd.rim.location.xloc" \
57 "text/vtt" \ 59 "text/vtt" \
58 "text/x-component" \ 60 "text/x-component" \
59 "text/x-cross-domain-policy" \ 61 "text/x-cross-domain-policy" \
60 "text/xml" 62 "text/xml"
61   63  
62 </IfModule> 64 </IfModule>
63   65  
64 # Map the following filename extensions to the specified 66 # Map the following filename extensions to the specified
65 # encoding type in order to make Apache serve the file types 67 # encoding type in order to make Apache serve the file types
66 # with the appropriate `Content-Encoding` response header 68 # with the appropriate `Content-Encoding` response header
67 # (do note that this will NOT make Apache compress them!). 69 # (do note that this will NOT make Apache compress them!).
68 # 70 #
69 # If these files types would be served without an appropriate 71 # If these files types would be served without an appropriate
70 # `Content-Enable` response header, client applications (e.g.: 72 # `Content-Enable` response header, client applications (e.g.:
71 # browsers) wouldn't know that they first need to uncompress 73 # browsers) wouldn't know that they first need to uncompress
72 # the response, and thus, wouldn't be able to understand the 74 # the response, and thus, wouldn't be able to understand the
73 # content. 75 # content.
74 # 76 #
75 # https://httpd.apache.org/docs/current/mod/mod_mime.html#addencoding 77 # https://httpd.apache.org/docs/current/mod/mod_mime.html#addencoding
76   78  
77 <IfModule mod_mime.c> 79 <IfModule mod_mime.c>
78 AddEncoding gzip svgz 80 AddEncoding gzip svgz
79 </IfModule> 81 </IfModule>
80   82  
81 </IfModule> 83 </IfModule>
82   84