2 * MOD_GZIP APACHE CONFIGURATION DIRECTIVES
4 NOTE: This documentation applies to mod-gzip
5 version(s) 1.3.19.1a ( and above ).
7 * HOW TO ADD MOD_GZIP INFORMATION TO YOUR APACHE LOG FILES
9 mod_gzip uses the existing Apache 'notes' method to allow you
10 to add information to your existing Apache access.log file(s).
12 The following special 'LogFormat' will show only the compression
13 rate achieved. If a file as not compressed a 'dash' or a ZERO
14 will print instead of the number...
16 LogFormat "%h %l %u %t \"%r\" %>s %b
17 mod_gzip: %{mod_gzip_compression_ratio}npct."
18 common_with_mod_gzip_info1
20 The following special 'LogFormat' will show all the details
21 about a compressed file...
23 LogFormat "%h %l %u %t \"%r\" %>s %b
24 mod_gzip: %{mod_gzip_result}n
25 In:%{mod_gzip_input_size}n
26 Out:%{mod_gzip_output_size}n:%{mod_gzip_compression_ratio}npct."
27 common_with_mod_gzip_info2
29 In order to actually use any special 'LogFormat' you must specify
30 it as a 'CustomLog' entry using the following Apache directive...
32 CustomLog logs/access.log common_with_mod_gzip_info2
34 Warning: If you have more than one 'CustomLog' entry defined then
35 you will get more than 1 log entry for each page requested from
36 the Server. Unless you desire multiple log entries for each
37 request then make sure there is only one active 'CustomLog' entry
38 in your httpd.conf file.
40 See the Apache documentation itself for more information about
41 how to use the 'LogFormat' and 'CustomLog' directives.
44 * MOD_GZIP CONFIGURATION DIRECTIVES
46 These are the mod_gzip configuration directives that can be
47 added to your existing Apache httpd.conf configuration file...
50 Yes=mod_gzip will handle requests. No=mod_gzip is disabled.
52 mod_gzip_add_header_count [Yes/No]
53 Yes=Add header byte counts to Common Log Format output total(s).
55 mod_gzip_keep_workfiles [Yes/No]
56 Yes=Keep any work files used. No=Automatically delete any work files used.
57 Only set this to 'Yes' for debugging purposes.
59 mod_gzip_dechunk [Yes/No]
60 Yes=Allow removal of 'Transfer-encoding: chunked' when necessary.
61 Certain 'Back-end' CGI processors such as PHP4 and ColdFusion are
62 always returning responses using 'Transfer-Encoding: chunked'.
63 In order for these responses to be compressed you should set this
64 directive to 'Yes' which will allow mod_gzip to remove the
65 'Transfer-Encoding: chunked' if/when it is necessary to do so.
67 mod_gzip_min_http [ 1000 or 1001 or ???? ]
68 Minimum HTTP protocol value to support. 1000 = HTTP/1.0 1001 = HTTP/1.1
69 If a browser or User-Agent does not report itself as being capable
70 of doing the 'minimum' HTTP level then no compression will be sent.
71 The directive uses the same 'numeric' protocol numbers used internally
74 mod_gzip_minimum_file_size [bytes]
75 Minimum size ( bytes ) of a file eligible for compression.
77 mod_gzip_maximum_file_size [bytes]
78 Maximum size ( bytes ) of a file eligible for compression.
80 mod_gzip_maximum_inmem_size [bytes]
81 Maximum size ( bytes ) to use for in-memory compression.
84 mod_gzip_temp_dir [Win32=c:\pathname UNIX=/pathname]
86 The directory to use for work files and compression cache.
88 The directory must already exist and have the correct
89 read/write permissions for the user/group name(s) used by
90 the Server while it is running.
92 Do not add a slash to the end of the directory pathname.
94 If not specifed, the default for Windows is "c:\temp" and the
95 default for UNIX is "/tmp".
97 mod_gzip_item_include ARG1 ARG2
98 ARG1=[mime,handler,file,uri,reqheader,rspheader]
99 ARG2=[Name of item to INCLUDE in list of things that should be compressed]
101 mod_gzip_item_exclude ARG1 ARG2
102 ARG1=[mime,handler,file,uri,reqheader,rspheader]
103 ARG2=[Name of item to EXCLUDE from list of things that should be compressed]
105 mod_gzip_command_version [string]
106 User defined pickup string to use for mod_gzip version command.
108 mod_gzip_can_negotiate [Yes/No]
109 Yes=Negotiate/send static compressed versions of files No=Do not negotiate.
112 The following commands are no longer supported...
115 mod_gzip_do_static_files
117 mod_gzip_verbose_debug
121 * USING MOD_INFO TO SEE ALL APACHE MODULE CONFIGURATION DIRECTIVES...
123 You can always simply 'ask' any Apache Web Server to show you all
124 the modules installed and print a list of all the directives
125 available for each module.
127 "mod_info" is the Apache standard module that supplies the information.
129 This is a text based reprint of the Apache documentation
130 page for mod_info taken from a copy of Apache 1.3.12..
134 Apache HTTP Server Version 1.3
138 This module is contained in the mod_info.c file.
139 It provides a comprehensive overview of the server configuration
140 including all installed modules and directives in the
143 This module is not compiled into the server by default.
145 It is only available in Apache 1.1 and later.
147 To enable it, add the following line to the server build
148 Configuration file, and rebuild the server:
150 AddModule modules/standard/mod_info.o
152 To configure it, add the following to your access.conf file.
154 <Location /server-info>
155 SetHandler server-info
158 You may wish to add a <Limit> clause inside the location directive
159 to limit access to your server configuration information.
161 Once configured, the server information is obtained by accessing
163 http://your.host.dom/server-info
165 Note that the configuration files are read by the module at run-time,
166 and therefore the display may not reflect the running server's active
167 configuration if the files have been changed since the server was last
168 reloaded. Also, the configuration files must be readable by the user
169 as which the server is running (see the User directive), or else the
170 directive settings will not be listed.
172 It should also be noted that if mod_info is compiled into the server,
173 its handler capability is available in all configuration files,
174 including per-directory files (e.g., .htaccess).
175 This may have security-related ramifications for your site.
179 Syntax: AddModuleInfo module-name string
180 Context: server config, virtual host
183 Compatibility: Apache 1.3 and above
185 This allows the content of string to be shown as HTML interpreted,
186 Additional Information for the module module-name. Example:
188 AddModuleInfo mod_auth.c
189 'See <A HREF="http://www.apache.org/docs/mod/mod_auth.html">
190 http://www.apache.org/docs/mod/mod_auth.html</A>'
194 If both mod_gzip and mod_info are installed and you send the
195 following request to the Server...
197 http://your.host.dom/server-info
199 ...then this is what you should see in the mod_gzip section
203 Yes=mod_gzip will handle requests. No=mod_gzip is disabled.
205 mod_gzip_add_header_count
206 Yes=Add header byte counts to Common Log Format output total(s).
208 mod_gzip_keep_workfiles
209 Yes=Keep any work files used. No=Automatically delete any work files used.
212 Yes=Allow removal of 'Transfer-encoding: chunked' when necessary.
215 Minimum HTTP protocol value to support. 1000 = HTTP/1.0 1001 = HTTP/1.1
217 mod_gzip_minimum_file_size
218 Minimum size ( bytes ) of a file eligible for compression.
220 mod_gzip_maximum_file_size
221 Maximum size ( bytes ) of a file eligible for compression.
223 mod_gzip_maximum_inmem_size
224 Maximum size ( bytes ) to use for in-memory compression.
227 The directory to use for work files and compression cache.
229 mod_gzip_item_include
230 ARG1=[mime,handler,file,uri,reqheader,rspheader]
231 ARG2=[Name of item to INCLUDE in list of things that should be compressed]
233 mod_gzip_item_exclude
234 ARG1=[mime,handler,file,uri,reqheader,rspheader]
235 ARG2=[Name of item to EXCLUDE from list of things that should be compressed]
237 mod_gzip_command_version
238 User defined pickup string to use for mod_gzip version command.
240 mod_gzip_can_negotiate
241 Yes=Negotiate/send static compressed versions of files No=Do not negotiate.
244 Configuration directive no longer supported.
246 mod_gzip_do_static_files
247 Configuration directive no longer supported.
250 Configuration directive no longer supported.
252 mod_gzip_verbose_debug
253 Configuration directive no longer supported.
256 Configuration directive no longer supported.