Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://www.arcetri.astro.it/manual/ko/mod/mod_ext_filter.html
Äàòà èçìåíåíèÿ: Mon Jan 21 19:44:30 2013
Äàòà èíäåêñèðîâàíèÿ: Fri Feb 28 07:57:57 2014
Êîäèðîâêà: ISO8859-5

Ïîèñêîâûå ñëîâà: ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï
mod_ext_filter - Apache HTTP Server
<-
Apache > HTTP Server > Documentation > Version 2.2 > È?Åò

ÎÖÖÔÔÅ È?Åò mod_ext_filter

ÀÅÄÙ×á Î?Îþ:  en  |  ja  |  ko 

ÐÜ É?Ì-ÄÒ ÓæÍÕÖ× É?Ï?ÐÜ ÎÖÄåÄßÄé. ÓæÁéÏÅ Ê?ÀöÅØ ÃËÏûÐÊ ÏÅÎþ É?Ì-È? Ò?Àý×ßÌÌÏô.
ÌÃÈý:ÐÐÄô ÃËÏûÐË ÏìÊÞ ×ÑÇÞÁçÇ?ÐÈÇÞ ÓÃÈ?×á ØÔ Õ?Æ?ÐÜÎ?Ö?ÇÞ ÊÈÃÍÄé
Ë?ÕÒ:Extension
È?ÅòÈý:ext_filter_module
ÌâÍÊÖÔÐß:mod_ext_filter.c

ÏôÎð

mod_ext_filterÈ? Ë÷Ïû×ßÈù À?Äì×ßÀý ÐÝÌ?×á ÉöÉÐÈÇÞ ×ÚÕÝÈ? ÈÈÅù Ì? ÐæÄé. ×?ÑèÐäÇÒÏÅÌ- ÐàÀý ×?ÑèÓòÇÒÏÅ ÎÂÄÒ ×ÑÇÞÁçÇ?(Ñÿ, Ð?ÄàÍÊÍÔ ×ÚÕÝ ÈýÇÙÎþ)ÐË ÎÖÖÔÔÅ ×ÚÕÝÇÞ Ë÷Ïû×â Ì? ÐæÄé. ÐÜÇÁ ×ÚÕÝÄÒ ÎÖÖÔÔÅ APIÇÞ ÎÂÏ?Ñ?Àý ÎÖÖÔÔÅ Ì-É? ×ÑÇÞÌÌÍÊ ÎØÏÅÌ- Í××ðÅ×ÄÒ ×ÚÕÝÏÅ Êå×è ÈÕÏü ÄÐÈ?Ñ?ÈÈ, ÄéÐÍÀ? ÀÀÐÊ ÐõÑÅÐÜ ÐæÄé:

Í×Ñ? Ë÷Ïû×ßÁòÏÅÄÒ ÌÊÄÙÐÜ ÆÃÎþÑ?Ñ?ÈÈ, mod_ext_filterÈ? Ë÷Ïû×ßÏ? ×ÚÕÝÈ? ËÅÈ? ÈÈÅùÎþÊÌ Ì? ÐæÄé.

Ñ?ÍÓÎþÅù

ÑæÑ?

Ò?Àý

top

ÏÉÑ?

ÄéÈ? typeÐ× ÐÐÄôÐË HTMLÇÞ ÈÈÅ÷Äé

# mod_ext_filter Ñ?ÍÓÎþÈ? ÀÅÑ?Àý
# ÏìÊÞ ×ÑÇÞÁçÇ? /usr/bin/enscriptÈ? Ë÷Ïû×ßÏ?
# É?Ì-ÖÔÐßÀ? text/c ÖÔÐßÐË HTMLÇÞ ÈÈÅùÀý ÀñÀ?Ð×
# typeÐË text/htmlÇÞ Ê?Àö×ßÄÒ ×ÚÕÝÈ? Ñ?Ð××áÄé
ExtFilterDefine c-to-html mode=output \
intype=text/c outtype=text/html \
cmd="/usr/bin/enscript --color -W html -Ec -o - -"

<Directory "/export/home/trawick/apacheinst/htdocs/c">
# ÓòÇÒÏÅ Ë?ÇÞÏþ ×ÚÕÝÈ? Í××ð×ßÄÒ core Ñ?ÍÓÎþ
SetOutputFilter c-to-html

# .c ÖÔÐßÐ× typeÐË text/cÇÞ ÈÈÅõÄÒ mod_mime
# Ñ?ÍÓÎþ
AddType text/c .c

# Å?É?Áç Ì?ÑèÐË Ã?Ï?Ì- ÏôÓËÈÆÄé ×?Ð÷ ÌÃÑ?ÐË
# ÎÛÇÑÑæÄÒ ÇÞÁçÉ?ÐË ÁòÇß×ßÄÒ mod_ext_filter
# Ñ?ÍÓÎþ
ExtFilterOptions DebugLevel=1
</Directory>

content ÐÞÔêÅ? ×ÚÕÝ ÁÈ×?×ßÁò

Note: ÎÖÇÅ gzip ÏÉÑ?ÄÒ ÄìÑ? ÌÃÈýÐË ÏÉÇÞ Å÷ ÀÝÐÜÄé. Í×Ñ? Ì-ÊåÍÊÏÅ Ë÷Ïû×ßÇÑÈù mod_deflateÈ? Ò?Àý×ßÁö ÉéÆ?Äé.

# ÏìÊÞ ×ÚÕÝÈ? Ñ?Ð××ßÄÒ mod_ext_filter Ñ?ÍÓÎþ
ExtFilterDefine gzip mode=output cmd=/bin/gzip

<Location /gzipped>
# ÓòÇÒ×âÆ? gzip ×ÚÕÝÈ? Í××ð×ßÄÒ core Ñ?ÍÓÎþ
SetOutputFilter gzip

# "Content-Encoding: gzip" ×üÄ?È? ÓïÀÅ×ßÄÒ
# mod_header Ñ?ÍÓÎþ
Header set Content-Encoding gzip
</Location>

Ì-É?È? ÄÐÈ?Àä ×ßÁò

# catÐÈÇÞ È?Å÷ ÃËÏûÐË ÕûÀ?×ßÄÒ ×ÚÕÝÈ? Ñ?Ð××ßÄÒ
# mod_ext_filter Ñ?ÍÓÎþ; catÐÊ ÎÖÉ?ÀÝÅÅ Ì?Ñ?×ßÑ?
# ÎÚÄÒÄé; ÄìÑ? ÓÃÈ?ÀöÇÞÈ? ÁöÀä ×ßÏ? ÐêÏ?ÐË Ä? ÌâÈ?×áÄé
ExtFilterDefine slowdown mode=output cmd=/bin/cat \
preservescontentlength

<Location />
# ÓòÇÒ×âÆ? slowdown ×ÚÕÝÈ? Ï?Ç?É? Í××ð×ßÄÒ core Ñ?ÍÓÎþ
#
SetOutputFilter slowdown;slowdown;slowdown
</Location>

sedÈ? Ë÷Ïû×ßÏ? ÐÐÄôÏÅÌ- ÁëÐË ÄûÓÌ×ßÁò

# ÐÐÄôÏÅÌ- ÁëÐË ÄûÓÌ×ßÄÒ ×ÚÕÝÈ? Ñ?Ð××ßÄÒ
# mod_ext_filter Ñ?ÍÓÎþ
#
ExtFilterDefine fixtext mode=output intype=text/html \
cmd="/bin/sed s/verdana/arial/g"

<Location />
# ÓòÇÒ×âÆ? fixtext ×ÚÕÝÈ? Í××ð×ßÄÒ core Ñ?ÍÓÎþ
SetOutputFilter fixtext
</Location>

ÄéÈ? ×ÚÕÝÈ? ÓïÐ?×ßÁò

# ÎàÓð É?Ñ?ÀÅ ÐæÄÒ Ö?Ñ? Õ?Æ?ÐÜÎ?Ö?(IP 192.168.1.31)ÏÅ
# Äû×è mod_deflateÀÅ ÐàÀý ÎÂÄÒ ÐêÇñÈ? ÓïÐ?×áÄé.
# ÐÜ ×ÚÕÝÄÒ mod_deflateÇÞ ÊÈÃËÁò Ð? ÐêÇñÈ? ÓïÐ?×áÄé.
ExtFilterDefine tracebefore \
cmd="/bin/tracefilter.pl /tmp/tracebefore" \
EnableEnv=trace_this_client

# ÐÜ ×ÚÕÝÄÒ mod_deflateÏÅÌ- Ã?ÏÐÄÒ ÐêÇñÈ? ÓïÐ?×áÄé.
# ftype ÖÔÆ?ÉÜÕÝÈ? Ë÷Ïû×ßÑ?ÎÚÄÒ ÀöÏü, ÁòÊË ×ÚÕÝ×?
# AP_FTYPE_RESOURCEÄÒ ×ÚÕÝ Ì?Ì-È? mod_deflate *ÐÜÐ?ÏÅ*
# ÅàÄé. AP_FTYPE_CONTENT_SET ÊÈÄé ÑÆÁí Ã?ÐÊ ÌÐêÀ?ÐË
# Ñ?Ñ?×ßÈù mod_deflate ÐÜØÔÏÅ Í××ð×áÄé.
ExtFilterDefine traceafter \
cmd="/bin/tracefilter.pl /tmp/traceafter" \
EnableEnv=trace_this_client ftype=21

<Directory /usr/local/docs>
SetEnvIf Remote_Addr 192.168.1.31 trace_this_client
SetOutputFilter tracebefore;deflate;traceafter
</Directory>

ÄéÐÍÐÊ ÐêÇñÈ? ÓïÐ?×ßÄÒ ×ÚÕÝÐÜÄé:

#!/usr/local/bin/perl -w
use strict;

open(SAVE, ">$ARGV[0]")
or die "can't open $ARGV[0]: $?";

while (<STDIN>) {
print SAVE $_;
print $_;
}

close(SAVE);

top

ExtFilterDefine Ñ?ÍÓÎþ

ÌÃÈý:ÏìÊÞ ×ÚÕÝÈ? Ñ?Ð××áÄé
É?É:ExtFilterDefine filtername parameters
Ë÷ÏûÐõÌâ:ÑæÌ-É?ÌÃÑ?
Ë?ÕÒ:Extension
È?Åò:mod_ext_filter

ExtFilterDefine Ñ?ÍÓÎþÄÒ ÏìÊÞ ×ÚÕÝÐ× ÌÊÑ?À? Í××ð×â ×ÑÇÞÁçÇ?, ÎÖÁäÈåÖ?È? Ñ?Ð××áÄé.

filternameÐÊ Ñ?Ð××â ×ÚÕÝ ÐÜÈ?ÐË Ñ?Ñ?×áÄé. ÐÜ ÐÜÈ?ÐË SetOutputFilter Ñ?ÍÓÎþÏÅÌ- Ë÷Ïû×áÄé. ÅþÇß×á È?Å÷ ×ÚÕÝÅùÀ?ÏÅ ÐÜÈ?ÐÜ ÀóÔÅÈù ÎØÅØÄé. ×?Ð÷ ×ÚÕÝÅþÇß APIÄÒ ÏÐÇ?È? ÊÈÀý×ßÑ? ÎÚÄÒÄé. ÁçÇÅÌ- Ë÷ÏûÐêÄÒ ÐÜÈ?ÐÜ ÀóÔÅÄÒ É?Ñ?È? ÎÛÑ? È?×áÄé.

Í××ð×â ÏìÊÞ ÈýÇÙÎþÏÝ ÄéÈ? ÌÊÑ?ÐË Ñ?Ð××ßÄÒ Ã?ÈãÑ? ÎÖÁäÈåÖ?ÄÒ ÎþÆ Ì?Ì-ÇÞ Ã?ÏÝÅÅ ÀÅÄÙ×ßÄé. Äì, cmd= ÖÔÆ?ÉÜÕÝÄÒ ÉíÅõÍÓ ×ÚÏô×ßÄé. Ë÷Ïû×â Ì? ÐæÄÒ ÖÔÆ?ÉÜÕÝÄÒ ÄéÐÍÀ? ÀÀÄé:

cmd=cmdline
cmd= ÕÀÏ?ÅõÄÒ Í××ð×â ÏìÊÞ ÈýÇÙÎþÈ? Ñ?Ñ?×áÄé. ×ÑÇÞÁçÇ?Èý ÅêÏÅ ÎÖÁäÈåÖ?ÀÅ ÐæÄéÈù ÈýÇÙ×ðÐË ÍæÅ?ÏØ×?ÇÞ É-ÎþÎï ×áÄé (ÏÉÈ? ÅùÎþ, cmd="/bin/mypgm arg1 arg2"). Í?ÐË ÀÕÔÅÑ?ÎÚÀý Ñ?Ñ? ×ÑÇÞÁçÇ?ÐË Í××ð×ßÁòÆ?É?ÏÅ ÐßÉíÐ?ÐÞ Í? Å?ÏØ×?ÄÒ ×ÚÏôÎ?Äé. ×ÑÇÞÁçÇ? ÎÖÁäÈåÖ?ÅùÐÊ À?ÉùÐÈÇÞ ÁÈÊà×áÄé. ×ÑÇÞÁçÇ? ÎÖÁäÈåÖ?ÏÅ À?ÉùÐÜ ÐæÄéÈù À?Éù ÎåÏÅ ÉùÍÍÇÅÍ?ÇÞ Ë÷Ïû×èÎï ×áÄé. ÉùÍÍÇÅÍ?ÀÅ ÎÖÁäÈåÖ?Ð× ÐßÊÞÆ?Èù ÉùÍÍÇÅÍ?È? ÅÞÉ? Ë÷Ïû×èÎï ×áÄé. ×ÑÇÞÁçÇ?ÐË Í××ð×âÆ? ×?Ñè CGI Ø?ÀöÊ?Ì?ÏÝ ÓïÀÅÇÞ DOCUMENT_URI, DOCUMENT_PATH_INFO, QUERY_STRING_UNESCAPED Ê?Ì?È? ÌÃÑ?×áÄé.
mode=mode
ÐÐÄôÐË ÓÃÈ?×ßÄÒ ×ÚÕÝÄÒ (ÁòÊËÀ?ÐÞ) mode=outputÐË Ë÷Ïû×áÄé. ÏôÓËÐË ÓÃÈ?×ßÄÒ ×ÚÕÝÄÒ mode=inputÐË Ë÷Ïû×áÄé. mode=inputÐÊ ÎÖÖÔÔÅ 2.1ÏÅ ÓïÀÅÅ×Î?Äé.
intype=imt
ÐÜ ÖÔÆ?ÉÜÕÝÄÒ ×ÚÕÝÇÞ ÓÃÈ?×â É?Ì-Ð× ÐÞÕÝÃí media type(Ñÿ, MIME type)ÐË Ñ?Ñ?×áÄé. ÁòÊËÐ?ÐÈÇÞ È?Å÷ É?Ì-È? ×ÚÕÝÇÞ ÓÃÈ?×áÄé. intype=ÐË Ñ?Ñ?×ßÈù ÄéÈ? typeÐ× É?Ì-ÄÒ ×ÚÕÝÇÞ ÓÃÈ?×ßÑ? ÎÚÄÒÄé.
outtype=imt
ÐÜ ÖÔÆ?ÉÜÕÝÄÒ ×ÚÕÝÇÞ ÓÃÈ?×á É?Ì-Ð× ÐÞÕÝÃí media type(Ñÿ, MIME type)ÐË Ñ?Ñ?×áÄé. ×ÚÕÝÓÃÈ? ÐëÎ?ÑïÏÅ ÐÞÕÝÃí media typeÐË Ê?Àö×âÆ? Ð?Ïû×ßÄé. ÁòÊËÐ?ÐÈÇÞ, ÐÞÕÝÃí media typeÐÊ Ê?×ßÑ? ÎÚÄÒÄé.
PreservesContentLength
PreservesContentLength ÕÀÏ?ÅõÄÒ ×ÚÕÝÀÅ content lengthÈ? Ð?Ñ?×ßÅÅÇß ×áÄé. ÄûÊÞÊàÐ× ×ÚÕÝÀÅ content lengthÈ? Ê?Àö×ßÉ×ÇÞ ÐÜ ÕÀÏ?ÅõÄÒ ÁòÊËÀ?ÐÜ ÎÖÄßÄé. ×ÚÕÝÀÅ ÁöÐÜÈ? Ð?Ñ?×âÆ?ÈÈ ÐÜ ÕÀÏ?ÅõÈ? Ë÷Ïû×èÎï ×áÄé.
ftype=filtertype
ÐÜ ÖÔÆ?ÉÜÕÝÄÒ ×ÚÕÝ ÑÎÇ?ÏÅ Äû×á ÌÐêÀ?ÐË Ñ?Ñ?×áÄé. ÄûÊÞÊàÐ× ÀöÏü ÁòÊËÀ?ÐÞ AP_FTYPE_RESOURCEÀÅ Ð?Ä÷×ßÄé. ×ÚÕÝÈ? Í××ð×ßÄÒ Ì?Ì-ÀÅ ÐêÏ?×ÚÕÝÏÝ ÄîÆ?Îï×ßÄÒ ÀöÏü ÐÜ ÖÔÆ?ÉÜÕÝÀÅ ×ÚÏô×ßÄé. Ð?Ä÷×á À?ÐË ÎÛÇÑÈù util_filter.hÏÅ ÐæÄÒ AP_FTYPE_* Ñ?Ð×È? Ò?Àý×ßÆ?.
disableenv=env
ÐÜ ÖÔÆ?ÉÜÕÝÇÞ ÌÃÑ?×á Ø?ÀöÊ?Ì?ÀÅ Ñ?Ð×Å×Î?ÄéÈù ×ÚÕÝÈ? Ë÷Ïû×ßÑ? ÎÚÄÒÄé.
enableenv=env
ÐÜ ÖÔÆ?ÉÜÕÝÇÞ ÌÃÑ?×á Ø?ÀöÊ?Ì?ÀÅ Ñ?Ð×ÅØ ÀöÏü ×ÚÕÝÈ? Ë÷Ïû×áÄé.
top

ExtFilterOptions Ñ?ÍÓÎþ

ÌÃÈý:mod_ext_filter ÏÙÌ×ÐË ÌÃÑ?×áÄé
É?É:ExtFilterOptions option [option] ...
ÁòÊËÀ?:ExtFilterOptions DebugLevel=0 NoLogStderr
Ë÷ÏûÐõÌâ:directory
Ë?ÕÒ:Extension
È?Åò:mod_ext_filter

ExtFilterOptions Ñ?ÍÓÎþÄÒ mod_ext_filterÐ× Ö?ÊÀ×á ÓÃÈ?ÏÙÌ×ÐË Ñ?Ñ?×áÄé. OptionÐÊ ÄéÐÍÑï ×ßÃ?Äé.

DebugLevel=n
DebugLevel ÕÀÏ?ÅõÄÒ mod_ext_filterÀÅ ÁòÇß×ßÄÒ Å?É?Áç É?ÁÈ Ì?ÑèÐË Ñ?×áÄé. ÁòÊËÀ?ÐÊ Å?É?ÁçÉ?ÐË ÁòÇß×ßÑ? ÎÚÄÒÄé. ÐÜÄÒ DebugLevel=0À? ÀÀÄé. Ã?ÐÊ ÌÐêÈ? Ë÷Ïû×âÌ?Çß, Ä? ÈÉÐÊ Å?É?ÁçÉ?ÐÜ ÁòÇßÅ×Àý Ì-É? ÌÊÄÙÐÜ ÆÃÎþÑ?Äé. ÌÐêÀ?Ð× Í×Ñ? Ð×ÉÜÄÒ mod_ext_filter.c ÎåÊÞÊàÏÅ ÐæÄÒ DBGLVL_ Ë?Ì? Ñ?Ð×ÏÅ ÌÃÈýÅ×ÐæÄé.

ÑæÐ×: ×ÚÕÝ ÇÞÁçÈ? ÁòÇß×ßÇÑÈù core Ñ?ÍÓÎþ LogLevelÐË Ë÷Ïû×ßÏ? Å?É?ÁçÉ?ÐË ÎÖÖÔÔÅ ÏÐÇ?ÇÞÁçÏÅ ÁòÇß×èÎï ×áÄé.

LogStderr | NoLogStderr
LogStderr ÕÀÏ?ÅõÄÒ ÏìÊÞ ×ÚÕÝ ×ÑÇÞÁçÇ?ÐÜ ×?ÑèÏÐÇ?ÇÞ ÓòÇÒ×ßÄÒ É?ÁÈÈ? ÎÖÖÔÔÅ ÏÐÇ?ÇÞÁçÏÅ ÁòÇß×áÄé. NoLogStderrÄÒ ÐÜ ÁòÄÙÐË ×ßÑ? ÎÚÄÒÄé.

ÏÉÑ?

ExtFilterOptions LogStderr DebugLevel=0

Ð?Ð× ÌÃÑ?ÐË Ë÷Ïû×ßÈù ×ÚÕÝÀÅ ×?ÑèÏÐÇ?ÇÞ ÓòÇÒ×ßÄÒ É?ÁÈÈ? ÎÖÖÔÔÅ ÏÐÇ?ÇÞÁçÏÅ ÁòÇß×ßÀý, mod_ext_filterÄÒ ÐêÓÌ Å?É?ÁçÉ?ÐË ÁòÇß×ßÑ? ÎÚÄÒÄé.

ÀÅÄÙ×á Î?Îþ:  en  |  ja  |  ko 

top

Comments

Notice:
This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.