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