]> git.pld-linux.org Git - packages/apache-mod_gzip.git/blame - samples.txt
- really fixed
[packages/apache-mod_gzip.git] / samples.txt
CommitLineData
da1204da 1
2File: samples.txt
3Subj: KNOWN good mod_gzip sample configurations
4Auth: Kevin Kiley
5
6NOTE: These KNOWN good sample configurations are for
7version 1.3.17.2a ( and above ) of mod_gzip unless
8otherwise indicated.
9
10Many thanks to the members of the mod_gzip online forum
11for taking the time to post their KNOWN GOOD configurations.
12
13You can join the mod_gzip online forum at...
14http://lists.over.net/mailman/listinfo/mod_gzip
15
16There are several 'safe' configurations in this file so scroll
17down to see them all. They will be broken out into separate
18files soon with their own links but for now they are all
19included here in the same document.
20
21
22*** MINIMUM 'SAFE' CONFIGURATION...
23*** This will only compress text/html and text/plain MIME types...
24
25Submitted by: Kevin Kiley 02/21/01
26
27The minimum 'safe' set of configuration commands for
28the 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#
39mod_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#
54mod_gzip_item_include file \.htm$
55mod_gzip_item_include file \.html$
56mod_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#
79mod_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#
115mod_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#
124mod_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
131Submitted by: David Rees 02/21/01
132
133Here is a KNOWN working config which compresses output for static
134text files, PHP, JSP/servlets (using Jakarta Tomcat/ mod_jk),
135mod_perl as well as the output from the mod_status and
136mod_info modules. It EXCLUDES Style Sheets ( .css ) and
137.js scripts and image/* mime type(s).
138
139mod_gzip_on Yes
140mod_gzip_minimum_file_size 300
141mod_gzip_maximum_file_size 0
142mod_gzip_maximum_inmem_size 100000
143mod_gzip_keep_workfiles No
144mod_gzip_temp_dir /usr/local/apache/gzip
145mod_gzip_item_include file \.html$
146mod_gzip_item_include file \.jsp$
147mod_gzip_item_include file \.php$
148mod_gzip_item_include file \.pl$
149mod_gzip_item_include mime ^text/.*
150mod_gzip_item_include mime ^application/x-httpd-php
151mod_gzip_item_include mime ^httpd/unix-directory$
152mod_gzip_item_include handler ^perl-script$
153mod_gzip_item_include handler ^server-status$
154mod_gzip_item_include handler ^server-info$
155mod_gzip_item_exclude file \.css$
156mod_gzip_item_exclude file \.js$
157mod_gzip_item_exclude mime ^image/.*
158
159
160*** LINUX + APACHE 1.3.14 + MOD_JSERV + MOD_SSE
161
162Here is a KNOWN good mod_gzip configuration section for
163Apache 1.3.14 with mod_jserv and mod_ssl running on linux.
164
165Submitted by: Michael Suszycki 02/21/01
166
167<IfModule mod_gzip.c>
168mod_gzip_on yes
169mod_gzip_dechunk yes
170mod_gzip_keep_workfiles No
171mod_gzip_temp_dir /tmp
172mod_gzip_minimum_file_size 1002
173mod_gzip_maximum_file_size 0
174mod_gzip_maximum_inmem_size 1000000
175
176mod_gzip_item_include file \.htm$
177mod_gzip_item_include file \.html$
178mod_gzip_item_include mime text/.*
179mod_gzip_item_include file \.php$
180mod_gzip_item_include mime "jserv-servlet"
181mod_gzip_item_include handler "jserv-servlet"
182mod_gzip_item_include mime "application/x-httpd-php.*"
183mod_gzip_item_include mime httpd/unix-directory
184
185mod_gzip_item_exclude file "\.css$"
186mod_gzip_item_exclude file "\.js$"
187mod_gzip_item_exclude file "\.wml$"
188LogFormat "%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
189CustomLog /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
195Here is a KNOWN good mod_gzip configuration section for
196SuSE Linux 6.2 running Apache 1.3.17 and mod_php 4.0.5dev.
197It only compresses UNIX directory listings, text/html,
198text/plain and PHP script output.
199
200Submitted by: Philip Hofstetter 02/24/01
201
202mod_gzip_on Yes
203mod_gzip_item_include file \.htm$
204mod_gzip_item_include file \.html$
205mod_gzip_item_include file \.php$
206mod_gzip_item_include mime text/.*
207mod_gzip_item_include mime httpd/unix-directory
208mod_gzip_dechunk yes
209mod_gzip_temp_dir /tmp
210mod_gzip_keep_workfiles No
211
212*** END OF DOCUMENT
213
This page took 0.063653 seconds and 4 git commands to generate.