]> git.pld-linux.org Git - packages/apache-mod_gzip.git/blob - samples.txt
- release 4: use new %doc.
[packages/apache-mod_gzip.git] / samples.txt
1
2 File: samples.txt
3 Subj: KNOWN good mod_gzip sample configurations
4 Auth: Kevin Kiley
5
6 NOTE: These KNOWN good sample configurations are for
7 version 1.3.17.2a ( and above ) of mod_gzip unless
8 otherwise indicated.
9
10 Many thanks to the members of the mod_gzip online forum
11 for taking the time to post their KNOWN GOOD configurations.
12
13 You can join the mod_gzip online forum at...
14 http://lists.over.net/mailman/listinfo/mod_gzip
15
16 There are several 'safe' configurations in this file so scroll
17 down to see them all. They will be broken out into separate
18 files soon with their own links but for now they are all
19 included here in the same document.
20
21
22 *** MINIMUM 'SAFE' CONFIGURATION...
23 *** This will only compress text/html and text/plain MIME types...
24
25 Submitted by: Kevin Kiley 02/21/01
26
27 The minimum 'safe' set of configuration commands for 
28 the 1.3.17.x series would still look like the following...
29
30 # [ mod_gzip sample configuration ]
31
32 # mod_gzip_on [Yes/No]
33 #
34 # Use this command to turn mod_gzip 'on' or 'off'.
35 # The command can go into the base server configuration
36 # or be used to control if mod_gzip is active inside
37 # any particular virtual directory or host section.
38 #
39 mod_gzip_on Yes
40
41 # mod_gzip_item_include type regular_expression
42 # mod_gzip_item_exclude type regular_expression
43 #
44 # Use 'include' and 'exclude' commands to specify which
45 # items are eligible for compression.
46 #
47 # The valid values for 'type' field are...
48 #
49 # file, mime, handler, reqheader, rspheader.
50 #
51 # The 3rd parameter must be a valid 'regular expression'
52 # which will be used to 'match' the requested item(s).
53 #
54 mod_gzip_item_include file \.htm$
55 mod_gzip_item_include file \.html$
56 mod_gzip_item_include mime text/.*
57
58 # NOTE: The following entry was required to compress negotiated
59 # home pages in version 1.3.17.1a but is now only needed
60 # if you would like to compress your directory listings...
61 #
62 # mod_gzip_item_include mime httpd/unix-directory
63
64 # mod_gzip_dechunk [Yes/No]
65 #
66 # If a response is being generated dynamically and
67 # the response content generator is always using
68 # 'Transfer-Encoding: chunked' then that response
69 # cannot normally be 'compressed' since a transport layer
70 # encoding is already being applied. The "mod_gzip_dechunk Yes"
71 # option will transparently remove all 'chunked' encoding
72 # and allow the response to be fully compressed. Certain
73 # versions of mod_php will need this option set ON for the
74 # dynamic output to be compressed. Whenever possible just
75 # make sure this option and the extra step required
76 # are NOT needed by making sure the response generator is NOT
77 # using 'Transfer-encoding: chunked'.
78 #
79 mod_gzip_dechunk yes
80
81 # mod_gzip_min_http [1000/1001/etc...]
82 #
83 # Only use this to 'block' browsers that don't support a
84 # certain minimum level of the HTTP protocol. The option
85 # uses the same internal 'numeric' value(s) used by Apache
86 # itself to indicate certain HTTP protocol support level(s).
87 #
88 # 1000=HTTP/1.0 1001=HTTP/1.1, etc.
89 #
90 # mod_gzip_min_http 1000
91
92 # mod_gzip_temp_dir /tmp
93 #
94 # Use this option to specify the directory that mod_gzip should
95 # use for workfiles. Do not add a trailing 'slash' to the name.
96 #
97 # Whenever possible ( and for the best performance ) this 'temporary'
98 # workfile directory should be a valid RAMDISK.
99 #
100 # The directory must already exist when Apache starts.
101 #
102 # Be sure permissions are set right for whatever directory is
103 # used as the 'temp_dir'. The User/Group used by the Server during
104 # runtime ( such as 'www' or 'nobody' ) must have read/write
105 # access to the directory. If permissions are incorrect then the
106 # mod_gzip 'result' string will probably be 'RECOVERY' and your
107 # Apache error_log will contain messages about mod_gzip being
108 # unable to access work files.
109 #
110 # If no 'mod_gzip_temp_dir' is specified then the DEFAULTS are...
111 #
112 # /tmp for UNIX
113 # c:\temp for Win32.
114 #
115 mod_gzip_temp_dir /tmp
116
117 # mod_gzip_keep_workfiles [Yes/No]
118 #
119 # If this option is 'Yes' then mod_gzip will not delete any
120 # workfiles it may be generating in the 'mod_gzip_temp_dir'
121 # location. Use this option only for diagnostic purposes.
122 # The 'default' setting is 'No'.
123 #
124 mod_gzip_keep_workfiles No
125
126 # [End of mod_gzip sample config]
127
128
129 *** PHP, JAVA JSP TOMCAT, MOD_JK, MOD_PERL, ETC...
130
131 Submitted by: David Rees 02/21/01
132
133 Here is a KNOWN working config which compresses output for static
134 text files, PHP, JSP/servlets (using Jakarta Tomcat/ mod_jk),
135 mod_perl as well as the output from the mod_status and
136 mod_info modules. It EXCLUDES Style Sheets ( .css ) and
137 .js scripts and image/* mime type(s).
138
139 mod_gzip_on                 Yes
140 mod_gzip_minimum_file_size  300
141 mod_gzip_maximum_file_size  0
142 mod_gzip_maximum_inmem_size 100000
143 mod_gzip_keep_workfiles     No
144 mod_gzip_temp_dir           /usr/local/apache/gzip
145 mod_gzip_item_include       file \.html$
146 mod_gzip_item_include       file \.jsp$
147 mod_gzip_item_include       file \.php$
148 mod_gzip_item_include       file \.pl$
149 mod_gzip_item_include       mime ^text/.*
150 mod_gzip_item_include       mime ^application/x-httpd-php
151 mod_gzip_item_include       mime ^httpd/unix-directory$
152 mod_gzip_item_include       handler ^perl-script$
153 mod_gzip_item_include       handler ^server-status$
154 mod_gzip_item_include       handler ^server-info$
155 mod_gzip_item_exclude       file \.css$
156 mod_gzip_item_exclude       file \.js$
157 mod_gzip_item_exclude       mime ^image/.*
158
159
160 *** LINUX + APACHE 1.3.14 + MOD_JSERV + MOD_SSE
161
162 Here is a KNOWN good mod_gzip configuration section for
163 Apache 1.3.14 with mod_jserv and mod_ssl running on linux.
164
165 Submitted by: Michael Suszycki 02/21/01
166
167 <IfModule mod_gzip.c>
168 mod_gzip_on yes
169 mod_gzip_dechunk yes
170 mod_gzip_keep_workfiles No
171 mod_gzip_temp_dir /tmp
172 mod_gzip_minimum_file_size  1002
173 mod_gzip_maximum_file_size  0
174 mod_gzip_maximum_inmem_size 1000000
175
176 mod_gzip_item_include file \.htm$
177 mod_gzip_item_include file \.html$
178 mod_gzip_item_include mime text/.*
179 mod_gzip_item_include file \.php$
180 mod_gzip_item_include mime "jserv-servlet"
181 mod_gzip_item_include handler "jserv-servlet"
182 mod_gzip_item_include mime "application/x-httpd-php.*"
183 mod_gzip_item_include mime httpd/unix-directory
184
185 mod_gzip_item_exclude file "\.css$"
186 mod_gzip_item_exclude file "\.js$"
187 mod_gzip_item_exclude file "\.wml$"
188 LogFormat "%h %l %u %t \"%V %r\" %>s %b mod_gzip: %{mod_gzip_result}n In:%{mod_gzip_input_size}n Out:%{mod_gzip_output_size}n:%{mod_gzip_compression_ratio}npct." common_with_mod_gzip_info2
189 CustomLog /var/log/httpd/mod_gzip  common_with_mod_gzip_info2
190 </IfModule>
191
192
193 *** SuSE LINIX + APACHE 1.3.17 + mod_php 4.0.5dev
194
195 Here is a KNOWN good mod_gzip configuration section for
196 SuSE Linux 6.2 running Apache 1.3.17 and mod_php 4.0.5dev.
197 It only compresses UNIX directory listings, text/html,
198 text/plain and PHP script output.
199
200 Submitted by: Philip Hofstetter 02/24/01
201
202 mod_gzip_on Yes
203 mod_gzip_item_include file \.htm$
204 mod_gzip_item_include file \.html$
205 mod_gzip_item_include file \.php$
206 mod_gzip_item_include mime text/.*
207 mod_gzip_item_include mime httpd/unix-directory
208 mod_gzip_dechunk yes
209 mod_gzip_temp_dir /tmp
210 mod_gzip_keep_workfiles No
211
212 *** END OF DOCUMENT
213
This page took 0.050855 seconds and 3 git commands to generate.