Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ
îðèãèíàëüíîãî äîêóìåíòà
: 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 Ïîèñêîâûå ñëîâà: ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï |
Apache HTTP Server Version 2.2
ÌÃÈý: | ÐÐÄô ÃËÏûÐË ÏìÊÞ ×ÑÇÞÁçÇ?ÐÈÇÞ ÓÃÈ?×á ØÔ Õ?Æ?ÐÜÎ?Ö?ÇÞ ÊÈÃÍÄé |
---|---|
Ë?ÕÒ: | Extension |
È?ÅòÈý: | ext_filter_module |
ÌâÍÊÖÔÐß: | mod_ext_filter.c |
mod_ext_filter
È? Ë÷Ïû×ßÈù À?Äì×ßÀý ÐÝÌ?×á
ÉöÉÐÈÇÞ ×ÚÕÝÈ? ÈÈÅù Ì? ÐæÄé.
×?ÑèÐäÇÒÏÅÌ- ÐàÀý ×?ÑèÓòÇÒÏÅ ÎÂÄÒ ×ÑÇÞÁçÇ?(Ñÿ, Ð?ÄàÍÊÍÔ
×ÚÕÝ ÈýÇÙÎþ)ÐË ÎÖÖÔÔÅ ×ÚÕÝÇÞ Ë÷Ïû×â Ì? ÐæÄé. ÐÜÇÁ ×ÚÕÝÄÒ
ÎÖÖÔÔÅ APIÇÞ ÎÂÏ?Ñ?Àý ÎÖÖÔÔÅ Ì-É? ×ÑÇÞÌÌÍÊ ÎØÏÅÌ- Í××ðÅ×ÄÒ
×ÚÕÝÏÅ Êå×è ÈÕÏü ÄÐÈ?Ñ?ÈÈ, ÄéÐÍÀ? ÀÀÐÊ ÐõÑÅÐÜ ÐæÄé:
Í×Ñ? Ë÷Ïû×ßÁòÏÅÄÒ ÌÊÄÙÐÜ ÆÃÎþÑ?Ñ?ÈÈ,
mod_ext_filter
È? Ë÷Ïû×ßÏ? ×ÚÕÝÈ? ËÅÈ? ÈÈÅùÎþÊÌ
Ì? ÐæÄé.
# 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>
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>
# ÐÐÄôÏÅÌ- ÁëÐË ÄûÓÌ×ßÄÒ ×ÚÕÝÈ? Ñ?Ð××ßÄÒ
# 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);
ÌÃÈý: | ÏìÊÞ ×ÚÕÝÈ? Ñ?Ð××áÄé |
---|---|
É?É: | 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
intype=
ÐË Ñ?Ñ?×ßÈù
ÄéÈ? typeÐ× É?Ì-ÄÒ ×ÚÕÝÇÞ ÓÃÈ?×ßÑ? ÎÚÄÒÄé.outtype=imt
PreservesContentLength
PreservesContentLength
ÕÀÏ?ÅõÄÒ ×ÚÕÝÀÅ
content lengthÈ? Ð?Ñ?×ßÅÅÇß ×áÄé. ÄûÊÞÊàÐ× ×ÚÕÝÀÅ content
lengthÈ? Ê?Àö×ßÉ×ÇÞ ÐÜ ÕÀÏ?ÅõÄÒ ÁòÊËÀ?ÐÜ ÎÖÄßÄé. ×ÚÕÝÀÅ
ÁöÐÜÈ? Ð?Ñ?×âÆ?ÈÈ ÐÜ ÕÀÏ?ÅõÈ? Ë÷Ïû×èÎï ×áÄé.ftype=filtertype
disableenv=env
enableenv=env
ÌÃÈý: | 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
ÄÒ
ÐêÓÌ Å?É?ÁçÉ?ÐË ÁòÇß×ßÑ? ÎÚÄÒÄé.