* MOD_GZIP APACHE CONFIGURATION DIRECTIVES
NOTE: This documentation applies to mod-gzip
version(s) 1.3.19.1a ( and above ).
* HOW TO ADD MOD_GZIP INFORMATION TO YOUR APACHE LOG FILES
mod_gzip uses the existing Apache 'notes' method to allow you
to add information to your existing Apache access.log file(s).
The following special 'LogFormat' will show only the compression
rate achieved. If a file as not compressed a 'dash' or a ZERO
will print instead of the number...
LogFormat "%h %l %u %t \"%r\" %>s %b
mod_gzip: %{mod_gzip_compression_ratio}npct."
common_with_mod_gzip_info1
The following special 'LogFormat' will show all the details
about a compressed file...
LogFormat "%h %l %u %t \"%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
In order to actually use any special 'LogFormat' you must specify
it as a 'CustomLog' entry using the following Apache directive...
CustomLog logs/access.log common_with_mod_gzip_info2
Warning: If you have more than one 'CustomLog' entry defined then
you will get more than 1 log entry for each page requested from
the Server. Unless you desire multiple log entries for each
request then make sure there is only one active 'CustomLog' entry
in your httpd.conf file.
See the Apache documentation itself for more information about
how to use the 'LogFormat' and 'CustomLog' directives.
* MOD_GZIP CONFIGURATION DIRECTIVES
These are the mod_gzip configuration directives that can be
added to your existing Apache httpd.conf configuration file...
mod_gzip_on [Yes/No]
Yes=mod_gzip will handle requests. No=mod_gzip is disabled.
mod_gzip_add_header_count [Yes/No]
Yes=Add header byte counts to Common Log Format output total(s).
mod_gzip_keep_workfiles [Yes/No]
Yes=Keep any work files used. No=Automatically delete any work files used.
Only set this to 'Yes' for debugging purposes.
mod_gzip_dechunk [Yes/No]
Yes=Allow removal of 'Transfer-encoding: chunked' when necessary.
Certain 'Back-end' CGI processors such as PHP4 and ColdFusion are
always returning responses using 'Transfer-Encoding: chunked'.
In order for these responses to be compressed you should set this
directive to 'Yes' which will allow mod_gzip to remove the
'Transfer-Encoding: chunked' if/when it is necessary to do so.
mod_gzip_min_http [ 1000 or 1001 or ???? ]
Minimum HTTP protocol value to support. 1000 = HTTP/1.0 1001 = HTTP/1.1
If a browser or User-Agent does not report itself as being capable
of doing the 'minimum' HTTP level then no compression will be sent.
The directive uses the same 'numeric' protocol numbers used internally
by Apache itself.
mod_gzip_minimum_file_size [bytes]
Minimum size ( bytes ) of a file eligible for compression.
mod_gzip_maximum_file_size [bytes]
Maximum size ( bytes ) of a file eligible for compression.
mod_gzip_maximum_inmem_size [bytes]
Maximum size ( bytes ) to use for in-memory compression.
mod_gzip_temp_dir [Win32=c:\pathname UNIX=/pathname]
The directory to use for work files and compression cache.
The directory must already exist and have the correct
read/write permissions for the user/group name(s) used by
the Server while it is running.
Do not add a slash to the end of the directory pathname.
If not specifed, the default for Windows is "c:\temp" and the
default for UNIX is "/tmp".
mod_gzip_item_include ARG1 ARG2
ARG1=[mime,handler,file,uri,reqheader,rspheader]
ARG2=[Name of item to INCLUDE in list of things that should be compressed]
mod_gzip_item_exclude ARG1 ARG2
ARG1=[mime,handler,file,uri,reqheader,rspheader]
ARG2=[Name of item to EXCLUDE from list of things that should be compressed]
mod_gzip_command_version [string]
User defined pickup string to use for mod_gzip version command.
mod_gzip_can_negotiate [Yes/No]
Yes=Negotiate/send static compressed versions of files No=Do not negotiate.
The following commands are no longer supported...
mod_gzip_add_vinfo
mod_gzip_do_static_files
mod_gzip_do_cgi
mod_gzip_verbose_debug
mod_gzip_post_on
* USING MOD_INFO TO SEE ALL APACHE MODULE CONFIGURATION DIRECTIVES...
You can always simply 'ask' any Apache Web Server to show you all
the modules installed and print a list of all the directives
available for each module.
"mod_info" is the Apache standard module that supplies the information.
This is a text based reprint of the Apache documentation
page for mod_info taken from a copy of Apache 1.3.12..
[snip]
Apache HTTP Server Version 1.3
Module mod_info
This module is contained in the mod_info.c file.
It provides a comprehensive overview of the server configuration
including all installed modules and directives in the
configuration files.
This module is not compiled into the server by default.
It is only available in Apache 1.1 and later.
To enable it, add the following line to the server build
Configuration file, and rebuild the server:
AddModule modules/standard/mod_info.o
To configure it, add the following to your access.conf file.
SetHandler server-info
You may wish to add a clause inside the location directive
to limit access to your server configuration information.
Once configured, the server information is obtained by accessing
http://your.host.dom/server-info
Note that the configuration files are read by the module at run-time,
and therefore the display may not reflect the running server's active
configuration if the files have been changed since the server was last
reloaded. Also, the configuration files must be readable by the user
as which the server is running (see the User directive), or else the
directive settings will not be listed.
It should also be noted that if mod_info is compiled into the server,
its handler capability is available in all configuration files,
including per-directory files (e.g., .htaccess).
This may have security-related ramifications for your site.
AddModuleInfo
Syntax: AddModuleInfo module-name string
Context: server config, virtual host
Status: base
Module: mod_browser
Compatibility: Apache 1.3 and above
This allows the content of string to be shown as HTML interpreted,
Additional Information for the module module-name. Example:
AddModuleInfo mod_auth.c
'See
http://www.apache.org/docs/mod/mod_auth.html'
[snip]
If both mod_gzip and mod_info are installed and you send the
following request to the Server...
http://your.host.dom/server-info
...then this is what you should see in the mod_gzip section
of the report...
mod_gzip_on
Yes=mod_gzip will handle requests. No=mod_gzip is disabled.
mod_gzip_add_header_count
Yes=Add header byte counts to Common Log Format output total(s).
mod_gzip_keep_workfiles
Yes=Keep any work files used. No=Automatically delete any work files used.
mod_gzip_dechunk
Yes=Allow removal of 'Transfer-encoding: chunked' when necessary.
mod_gzip_min_http
Minimum HTTP protocol value to support. 1000 = HTTP/1.0 1001 = HTTP/1.1
mod_gzip_minimum_file_size
Minimum size ( bytes ) of a file eligible for compression.
mod_gzip_maximum_file_size
Maximum size ( bytes ) of a file eligible for compression.
mod_gzip_maximum_inmem_size
Maximum size ( bytes ) to use for in-memory compression.
mod_gzip_temp_dir
The directory to use for work files and compression cache.
mod_gzip_item_include
ARG1=[mime,handler,file,uri,reqheader,rspheader]
ARG2=[Name of item to INCLUDE in list of things that should be compressed]
mod_gzip_item_exclude
ARG1=[mime,handler,file,uri,reqheader,rspheader]
ARG2=[Name of item to EXCLUDE from list of things that should be compressed]
mod_gzip_command_version
User defined pickup string to use for mod_gzip version command.
mod_gzip_can_negotiate
Yes=Negotiate/send static compressed versions of files No=Do not negotiate.
mod_gzip_add_vinfo
Configuration directive no longer supported.
mod_gzip_do_static_files
Configuration directive no longer supported.
mod_gzip_do_cgi
Configuration directive no longer supported.
mod_gzip_verbose_debug
Configuration directive no longer supported.
mod_gzip_post_on
Configuration directive no longer supported.
[snip]
End of document.