blob: 477abcf49dbd18fa88c87df2c451d1acd5e7313e [file] [log] [blame]
<?xml version="1.0" encoding="iso-2022-jp"?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
<!-- English Revision: 151408:395231 (outdated) -->
<!--
Copyright 2002-2005 The Apache Software Foundation or its licensors, as
applicable.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<modulesynopsis metafile="mod_deflate.xml.meta">
<name>mod_deflate</name>
<description>$B%/%i%$%"%s%H$XAw$i$l$kA0$K%3%s%F%s%D$r05=L$9$k(B</description>
<status>Extension</status>
<sourcefile>mod_deflate.c</sourcefile>
<identifier>deflate_module</identifier>
<summary>
<p><module>mod_deflate</module> $B%b%8%e!<%k$O(B <code>DEFLATE</code>
$B=PNO%U%#%k%?$rDs6!$7$^$9!#$3$l$O%5!<%P$+$i$N=PNO$r!"%M%C%H%o!<%/$r(B
$BDL$7$F%/%i%$%"%s%H$KAw$kA0$K05=L$9$k$3$H$r2DG=$K$7$^$9!#(B</p>
</summary>
<seealso><a href="../filter.html">Filters</a></seealso>
<section id="recommended"><title>$B%5%s%W%k@_Dj(B</title>
<p>$B2<$K$;$C$+$A$J?M8~$1$N4JC1$J@_DjNc$r<($7$^$9!#(B</p>
<example><title>$B?t%?%$%W$N$_05=L$9$k(B</title>
AddOutputFilterByType DEFLATE text/html text/plain text/xml
</example>
<p>$B0J2<$N@_Dj$O%3%s%F%s%D$r$h$j05=L$7$^$9$,!"$:$C$HJ#;($J@_Dj$K$J$j$^$9!#(B
$B@_Dj$N6y!9$^$G$h$/M}2r$7$J$$$G;H$o$J$$$G$/$@$5$$!#(B</p>
<example><title>$B2hA|0J30A4$F05=L$9$k(B</title>
&lt;Location /&gt;<br />
<indent>
# Insert filter<br />
SetOutputFilter DEFLATE<br />
<br />
# Netscape 4.x has some problems...<br />
BrowserMatch ^Mozilla/4 gzip-only-text/html<br />
<br />
# Netscape 4.06-4.08 have some more problems<br />
BrowserMatch ^Mozilla/4\.0[678] no-gzip<br />
<br />
# MSIE masquerades as Netscape, but it is fine<br />
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html<br />
<br />
# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48<br />
# the above regex won't work. You can use the following<br />
# workaround to get the desired effect:<br />
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html<br />
<br />
# Don't compress images<br />
SetEnvIfNoCase Request_URI \<br />
<indent>
\.(?:gif|jpe?g|png)$ no-gzip dont-vary<br />
</indent>
<br />
# Make sure proxies don't deliver the wrong content<br />
Header append Vary User-Agent env=!dont-vary<br />
</indent>
&lt;/Location&gt;
</example>
</section>
<section id="enable"><title>$B05=L$rM-8z$K$9$k(B</title>
<section id="output"><title>Output Compression</title>
<p>$B05=L5!G=$O(B <code>DEFLATE</code> <a href="../filter.html">$B%U%#%k%?(B</a>
$B$K$h$j<BAu$5$l$F$$$^$9!#0J2<$N%G%#%l%/%F%#%V$O$=$N%G%#%l%/%F%#%V$N$"$k(B
$B%3%s%F%JCf$N%I%-%e%a%s%H$r05=L$9$k$h$&$K$7$^$9(B:</p>
<example>
SetOutputFilter DEFLATE
</example>
<p>$B$h$/;H$o$l$F$$$k%V%i%&%6$G$O!"$9$Y$F$N%3%s%F%s%D$KBP$9$k(B
$B05=L$r07$($k$o$1$G$O$"$j$^$;$s!#$G$9$+$i!"(B<code>gzip-only-text/html</code>
$B%N!<%H$r(B <code>1</code> $B$K$7$F!"(Bhtml $B%U%!%$%k$KBP$7$F$N$_(B
$B05=L$,F/$/$h$&$K$7$?J}$,$h$$$+$b$7$l$^$;$s(B ($B0J2<;2>H(B)
$B$3$NCM$r(B <em><code>1</code> $B0J30$NCM(B</em>$B$K@_Dj$7$?>l9g$OL5;k$5$l$^$9!#(B</p>
<p>$BDL>o!"FCDj$N(BMIME$B%?%$%W$K$D$$$F$N$_05=L$7$?$$$N$G$"$l$P!"(B
<directive module="core">AddOutputFilterByType</directive>
$B%G%#%l%/%F%#%V$r;HMQ$7$^$9!#<!$K(B Apache $B$N%I%-%e%a%s%H$N(B html
$B%U%!%$%k$N$_$N05=L$rM-8z$K$9$kNc$r<($7$^$9!#(B</p>
<example>
&lt;Directory "/your-server-root/manual"&gt;<br />
<indent>
AddOutputFilterByType DEFLATE text/html<br />
</indent>
&lt;/Directory&gt;
</example>
<p>$BA4$F$N%U%!%$%k%?%$%W$G$N05=L$KLdBj$rJz$($F$$$k%V%i%&%6$KBP$7$F$O!"(B
<directive module="mod_setenvif">BrowserMatch</directive>
$B%G%#%l%/%F%#%V$r;HMQ$7$F!"FCDj$N%V%i%&%6$K(B <code>no-gzip</code>
$B%N!<%H$r%;%C%H$7!"05=L$,9T$J$o$l$J$$$h$&$K$7$^$9!#(B
<code>no-gzip</code> $B$H(B <code>gzip-only-text/html</code>
$B$rAH$_9g$o$;$k$3$H$G>e<j$/BP=h$G$-$^$9!#(B
$B$3$N>l9g!"A0<T$,8e<T$r%*!<%P!<%i%$%I$7$^$9!#(B
$B>e5-$N(B<a href="#recommended">$B@_DjNc(B</a>$B$NH4?h$r(B
$B<!$K<($7$^$9$N$G$4Mw2<$5$$!#(B</p>
<example>
BrowserMatch ^Mozilla/4 gzip-only-text/html<br />
BrowserMatch ^Mozilla/4\.0[678] no-gzip<br />
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</example>
<p>$B$^$:;O$a$K(B <code>User-Agent</code> $BJ8;zNs$+$i(B Netscape Navigator
4.x $B$G$"$k$+$I$&$+$rD4$Y$^$9!#$3$l$i$N%P!<%8%g%s$G$O!"(B
<code>text/html</code> $B0J30$N%?%$%W$N05=L$r07$&$3$H$,$G$-$^$;$s!#(B
4.06, 4.07, 4.08 $B$O(B html $B%U%!%$%k$N?-D%$K$bLdBj$rJz$($F$$$^$9!#(B
$B$G$9$+$i$3$l$i$KBP$7$F$O!"40A4$K(B deflate $B%U%#%k%?$r%*%U$K$7$^$9!#(B</p>
<p>3 $BHVL\$N(B <directive module="mod_setenvif">BrowserMatch</directive>
$B%G%#%l%/%F%#%V$G!"?dB,$7$?%f!<%6!<%(!<%8%'%s%H$r=$@5$7$^$9!#(B
$B$J$<$J$i(B Microsoft Internet Explorer $B$b(B "Mozilla/4" $B$HFCDj$5$l$^$9$,!"(B
$B$3$l$i$O<B:]$K$O05=L$r07$&$3$H$,$G$-$k$+$i$G$9!#(B
<code>User-Agent</code> $B%X%C%@$r(B "MSIE"
(<code>\b</code> $B$O!VC18l$N6-3&!W$r0UL#$7$^$9(B) $B$NDI2CJ8;z$G8!::$7$F!"(B
$B$3$l0JA0$K@_Dj$7$?@)8B$r:F$S2r=|$7$^$9!#(B</p>
<note><title>$BCm(B</title>
<code>DEFLATE</code> $B%U%#%k%?$OI,$:!"(BPHP $B$d(B SSI $B$H$$$C$?(B RESOURCE
$B%U%#%k%?$N8e$K$J$j$^$9!#(B
DEFLATE $B%U%#%k%?$OFbItE*$J%5%V%j%/%(%9%H$r4XCN$7$^$;$s!#(B
</note>
<note><title>$BCm(B</title>
<directive module="core">SetEnv</directive> $B$G@_Dj$5$l$k(B
<code>force-gzip</code> $B4D6-JQ?t$,$"$j$^$9$,!"$3$l$O(B
$B%V%i%&%6$N(B accept-encoding $B@_Dj$rL5;k$7!"05=L$7$?=PNO$r$7$^$9!#(B
</note>
</section>
<section id="inflate"><title>$B=PNO$N?-D9(B</title>
<p><module>mod_deflate</module> $B%b%8%e!<%k$O!"(Bgzip $B05=L$5$l$?%l%9%]%s%9(B
$BK\J8$r(B inflate/uncompress $B$9$k%U%#%k%?$bDs6!$7$F$$$^$9!#(B
$B$3$N5!G=$rM-8z$K$9$k$K$O!"(B<directive module="core">SetOutputFilter</directive>
$B$d(B <directive module="mod_mime">AddOutputFilter</directive> $B$r;H$C$F!"(B
<code>INFLATE</code> $B%U%#%k%?$r=PNO%U%#%k%?%A%'%$%s$KA^F~$7$^$9!#(B
$BNc$($P<!$N$h$&$K$7$^$9!#(B</p>
<example>
&lt;Location /dav-area&gt;<br />
<indent>
ProxyPass http://example.com/<br />
SetOutputFilter INFLATE<br />
</indent>
&lt;/Location&gt;
</example>
<p>$B$3$NNc$G$O!"(Bexample.com $B$+$i$N(B gzip $B05=L$5$l$?=PNO$r?-D9$7!"(B
$B$=$NB>$N%U%#%k%?$,$5$i$K$=$N=PNO$r=hM}$G$-$k$h$&$K$7$^$9!#(B
</p>
</section>
<section id="input"><title>$BF~NO$N?-D%(B</title>
<p><module>mod_deflate</module> $B%b%8%e!<%k$O!"(Bgzip
$B$G05=L$5$l$?%j%/%(%9%HK\BN$r?-D%$9$k%U%#%k%?$bDs6!$7$F$$$^$9!#(B
$B$3$N5!G=$rM-8z$K$9$k$K$O!"(B<directive module="core">SetInputFilter</directive>
$B$+(B <directive module="mod_mime">AddInputFilter</directive> $B$r;HMQ$7$F!"(B
<code>DEFLATE</code> $B%U%#%k%?$rF~NO%U%#%k%?%A%'%$%s$KAH$_9~$_$^$9!#(B
$BNc$($P<!$N$h$&$K$J$j$^$9!#(B</p>
<example>
&lt;Location /dav-area&gt;<br />
<indent>
SetInputFilter DEFLATE<br />
</indent>
&lt;/Location&gt;
</example>
<p>$B$3$N@_Dj$G$"$l$P!"(B<code>Content-Encoding: gzip</code>
$B%X%C%@$r4^$`%j%/%(%9%H$,Mh$k$H!"K\BN$O<+F0E*$K?-D%$5$l$^$9!#(B
gzip $B%j%/%(%9%HK\BN$rAw?.$9$k%V%i%&%6$O$"$^$j$"$j$^$;$s!#(B
$B$7$+$7!"Nc$($P(B <a href="http://www.webdav.org">WebDAV</a>
$B%/%i%$%"%s%H$N4v$D$+$J$I!"FCJL$J%"%W%j%1!<%7%g%s$G%j%/%(%9%H$N(B
$B05=L$r<B:]$K%5%]!<%H$7$F$$$k$b$N$b$"$j$^$9!#(B</p>
<note type="warning"><title>Content-Length $B$K4X$9$kCm0U(B</title>
<p>$B%j%/%(%9%HK\BN$=$l<+BN$rI>2A$9$k>l9g$O!"(B<em><code>Content-Length</code>
$B%X%C%@$r?.MQ$7$J$$$G$/$@$5$$(B</em>$B!#(BContent-Length $B%X%C%@$O!"(B
$B%/%i%$%"%s%H$+$iAw?.$5$l$k%G!<%?$ND9$5$rH?1G$7$F$$$k$N$G$"$C$F!"(B
$B?-D%$5$l$?%G!<%?%9%H%j!<%`$N(B<em>$B%P%$%H%+%&%s%H$G$O$"$j$^$;$s(B</em>$B!#(B</p>
</note>
</section>
</section>
<section id="proxies"><title>Proxy $B%5!<%P$G$N07$$(B</title>
<p><module>mod_deflate</module> $B%b%8%e!<%k$O(B <code>Vary: Accept-Encoding</code>
HTTP $B1~Ez%X%C%@$rAw?.$7$F!"E,@Z$J(B <code>Accept-Encoding</code>
$B%j%/%(%9%H%X%C%@$rAw?.$9$k%/%i%$%"%s%H$KBP$7$F$N$_!"(B
$B%W%m%/%7%5!<%P$,%-%c%C%7%e$7$?1~Ez$rAw?.$9$k$h$&$KCm0U$r4-5/$7$^$9!#(B
$B$3$N$h$&$K$7$F!"05=L$r07$&$3$H$N$G$-$J$$%/%i%$%"%s%H$K(B
$B05=L$5$l$?FbMF$,Aw$i$l$k$3$H$N$J$$$h$&$K$7$^$9!#(B</p>
<p>$B$b$7FCJL$K2?$+$K0MB8$7$F=|30$7$?$$>l9g!"Nc$($P(B <code>User-Agent</code>
$B%X%C%@$J$I$K0MB8$7$F$$$k>l9g!"<jF0$G(B <code>Vary</code> $B%X%C%@$r@_Dj$7$F!"(B
$BDI2C$N@)8B$K$D$$$F%W%m%/%7%5!<%P$KCm0U$r9T$J$&I,MW$,$"$j$^$9!#(B
$BNc$($P(B <code>User-Agent</code> $B$K0MB8$7$F(B <code>DEFLATE</code>
$B$rDI2C$9$kE57?E*$J@_Dj$G$O!"<!$N$h$&$KDI2C$9$k$3$H$K$J$j$^$9!#(B</p>
<example>
Header append Vary User-Agent
</example>
<p>$B%j%/%(%9%H%X%C%@0J30$N>pJs(B (<em>$BNc$($P(B</em> HTTP $B%P!<%8%g%s(B)
$B$K0MB8$7$F05=L$9$k$+$I$&$+7h$a$k>l9g!"(B
<code>Vary</code> $B%X%C%@$r(B <code>*</code> $B$K@_Dj$9$kI,MW$,$"$j$^$9!#(B
$B$3$N$h$&$K$9$k$H!";EMM$K=`5r$7$?%W%m%/%7$O%-%c%C%7%e$rA4$/9T$J$o$J$/$J$j$^$9!#(B</p>
<example><title>$BNc(B</title>
Header set Vary *
</example>
</section>
<directivesynopsis>
<name>DeflateFilterNote</name>
<description>$B%m%.%s%0MQ$K05=LHf$r%a%b$KDI2C(B</description>
<syntax>DeflateFilterNote [<var>type</var>] <var>notename</var></syntax>
<contextlist><context>server config</context>
<context>virtual host</context></contextlist>
<compatibility><var>type</var> is available since Apache 2.0.45</compatibility>
<usage>
<p><directive>DeflateFilterNote</directive> $B%G%#%l%/%F%#%V$O(B
$B05=LHf$K4X$9$k%a%b$,%j%/%(%9%H$KIU2C$5$l$k$3$H$r;XDj$7$^$9!#(B
$B%a%b(B (note) $B$NL>A0$O%G%#%l%/%F%#%V$K;XDj$5$l$?CM$G$9!#(B
$B%a%b$O(B<a href="../logs.html#accesslog">$B%"%/%;%9%m%0(B</a>$B$K(B
$BCM$r5-O?$7!"E}7W$r<h$kL\E*$K$b;H$($^$9!#(B</p>
<example><title>$BNc(B</title>
DeflateFilterNote ratio<br />
<br />
LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate<br />
CustomLog logs/deflate_log deflate
</example>
<p>$B%m%0$+$i$b$C$H@:L)$JCM$rCj=P$7$?$$>l9g$O!"(B<var>type</var>
$B0z?t$r;HMQ$7$F!"%G!<%?%?%$%W$r%m%0$N%a%b$H$7$F;D$9$h$&$K;XDj$G$-$^$9!#(B
<var>type</var> $B$O<!$N$&$A$N0l$D$G$9!#(B</p>
<dl>
<dt><code>Input</code></dt>
<dd>$B%U%#%k%?$NF~NO%9%H%j!<%`$N%P%$%H%+%&%s%H$r%a%b$KJ]B8$9$k!#(B</dd>
<dt><code>Output</code></dt>
<dd>$B%U%#%k%?$N=PNO%9%H%j!<%`$N%P%$%H%+%&%s%H$r%a%b$KJ]B8$9$k!#(B</dd>
<dt><code>Ratio</code></dt>
<dd>$B05=LN((B (<code>$B=PNO(B / $BF~NO(B * 100</code>) $B$r%a%b$KJ]B8$9$k!#(B
<var>type</var> $B0z?t$r>JN,$7$?>l9g$O!"$3$l$,%G%U%)%k%H$H$J$j$^$9!#(B</dd>
</dl>
<p>$B$^$H$a$k$H!"<!$N$h$&$K%m%0$r<h$k$3$H$K$J$k$G$7$g$&!#(B</p>
<example><title>$B@:L)$J%m%0:N<h(B</title>
DeflateFilterNote Input instream<br />
DeflateFilterNote Output outstream<br />
DeflateFilterNote Ratio ratio<br />
<br />
LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate<br />
CustomLog logs/deflate_log deflate
</example>
</usage>
<seealso><module>mod_log_config</module></seealso>
</directivesynopsis>
<directivesynopsis>
<name>DeflateBufferSize</name>
<description>zlib $B$,0lEY$K05=L$9$k2t$NBg$-$5(B</description>
<syntax>DeflateBufferSize <var>value</var></syntax>
<default>DeflateBufferSize 8096</default>
<contextlist><context>server config</context>
<context>virtual host</context></contextlist>
<usage>
<p><directive>DeflateBufferSize</directive> $B%G%#%l%/%F%#%V$O(B
zlib $B$,0lEY$K05=L$9$k2t$NBg$-$5$r%P%$%HC10L$G;XDj$7$^$9!#(B</p>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>DeflateWindowSize</name>
<description>Zlib $B$N05=LMQ%&%#%s%I%&$NBg$-$5(B</description>
<syntax>DeflateWindowSize <var>value</var></syntax>
<default>DeflateWindowSize 15</default>
<contextlist><context>server config</context>
<context>virtual host</context></contextlist>
<usage>
<p><directive>DeflateWindowSize</directive> $B%G%#%l%/%F%#%V$O(B
zlib $B$N05=LMQ%&%#%s%I%&(B ($BLuCm(B: zlib $B$G;HMQ$5$l$kMzNr%P%C%U%!(B)
$B$NBg$-$5$r;XDj$7$^$9(B (1 $B$+$i(B 15 $B$N4V$NCM(B)$B!#(B
$B0lHLE*$KBg$-$J%&%#%s%I%&%5%$%:$r;HMQ$9$k$H05=LN($,8~>e$7$^$9!#(B
($BLuCm(B: 2 $B$rDl$H$9$kBP?t$NCM$K$J$j$^$9!#(B
8 $B$+$i(B 15 $B$K$9$k$N$,NI$$$G$7$g$&!#(B)</p>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>DeflateMemLevel</name>
<description>zlib $B$,05=L$K;H$&%a%b%j$N%l%Y%k$r;XDj(B</description>
<syntax>DeflateMemLevel <var>value</var></syntax>
<default>DeflateMemLevel 9</default>
<contextlist><context>server config</context>
<context>virtual host</context></contextlist>
<usage>
<p><directive>DeflateMemLevel</directive> $B%G%#%l%/%F%#%V$O(B
zlib $B$,05=L$K;H$&%a%b%j$N%l%Y%k$r@_Dj$7$^$9(B (1 $B$+$i(B 9 $B$N4V$NCM(B)$B!#(B
($BLuCm(B: 2 $B$rDl$H$9$kBP?t$NCM$K$J$j$^$9!#(B
8 $BDxEY$,NI$$$G$7$g$&!#(B)</p>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>DeflateCompressionLevel</name>
<description>$B=PNO$KBP$7$F9T$J$&05=L$NDxEY(B</description>
<syntax>DeflateCompressionLevel <var>value</var></syntax>
<default>Zlib $B$N%G%U%)%k%H(B</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>
<compatibility>This directive is available since Apache 2.0.45</compatibility>
<usage>
<p><directive>DeflateCompressionLevel</directive> $B%G%#%l%/%F%#%V$O(B
$B05=L$NDxEY$r@_Dj$7$^$9!#Bg$-$JCM$G$O!"$h$j05=L$,9T$J$o$l$^$9$,!"(B
CPU $B;q8;$r>CHq$7$^$9!#(B</p>
<p>$BCM$O(B 1 ($BDc05=L(B) $B$+$i(B 9 ($B9b05=L(B) $B$G$9!#(B</p>
</usage>
</directivesynopsis>
</modulesynopsis>