Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ
îðèãèíàëüíîãî äîêóìåíòà
: http://www.arcetri.astro.it/manual/ko/mod/mod_file_cache.html
Äàòà èçìåíåíèÿ: Mon Jan 21 19:44:30 2013 Äàòà èíäåêñèðîâàíèÿ: Fri Feb 28 08:04:25 2014 Êîäèðîâêà: ISO8859-5 Ïîèñêîâûå ñëîâà: ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ð ï ï ð ï ï ð ï |
Apache HTTP Server Version 2.2
ÌÃÈý: | ÈîÈ?È?ÏÅ Ñ?Ð? ÖÔÐßÅùÐË ÔÃÍ? |
---|---|
Ë?ÕÒ: | Experimental |
È?ÅòÈý: | file_cache_module |
ÌâÍÊÖÔÐß: | mod_file_cache.c |
mod_file_cache
È?
Ë÷Ïû×ßÏ? Ë÷ÐÜÖ?È? Î?ÈÑÐÈÇÞ ÈÈÅùÁò ÍÁÁòÆ?É?ÏÅ ÐÜ É?Ì-È?
ÂÔÂÔØ? ÐàÁö ÉéÆ?Äé.
ÀÕÐ× Ê?×ßÑ? ÎÚÀý ÐêÑæ ÏôÓËÅ×ÄÒ ÖÔÐßÐË ÔÃÍ?ÏÅ
Ð?Ðõ×ßÏ? Ì-É? ÊÞ×ßÈ? ÑéÐß Ì? ÐæÄé. mod_file_cache
ÄÒ
ÐêÑæ ÏôÓËÅ×ÄÒ Ñ?Ð? ÖÔÐßÐË ÅÞÀÅÑ? ÉöÍÔÐÈÇÞ ÔÃÍ?ÏÅ
Ð?Ðõ×áÄé. ÌÃÑ? Ñ?ÍÓÎþÈ? Ë÷Ïû×ßÏ? mod_file_cache
ÀÅ
ÖÔÐßÐË Ï-Àý(open) mmap()
×âÑ? ÎÖÄßÈù ÖÔÐßÐË
Ï-Àý ÖÔÐß ×êÅùÐË Ð?Ðõ×âÑ? ÀñÑ?×áÄé. ÅÞ ÉöÍÔ È?ÅÞ
ÖÔÐßÐË Ì-ÊåÍÊ×ßÁòÐ?×è ×ÚÏô×á ÐëÎ?Ð× ÐßÊÞÈ? (Ö?Ø? ÖÔÐß ÐäÓòÇÒ
ÐëÎ?) ÖÔÐßÐË ÏôÓË×â Æ?ÈÆÄé ÈÕÉ? ×ßÄÒ ÄûÍÕ Ì-É?ÀÅ ÍÓÐë×âÆ?
×áÉ?ÈÈ ×ßÏ? Ì-É? ÊÞ×ßÀÅ À?Ìâ×áÄé.
ÑæÐ×: ÐÜ ÉöÉÐÊ CGI ×ÑÇÞÁçÇ?ÐÜÃ? Ö?ÊÀ×á ÃËÏû×êÅùÇ?È? Õû×è Ì-ÊåÍÊ×ßÄÒ ÖÔÐßÐ× Ì-ÊåÍÊ ÌãÅÅÈ? Ã?Ðß Ì? Î?Äé. ÐÜ ÉöÉÐÊ ÊÈÕû ÎÖÖÔÔÅ core ÃËÏû×êÅùÇ?ÀÅ Ì-ÊåÍÊ×ßÄÒ ÐßÉíÖÔÐßÏÅÈÈ Ð?ÏûÅØÄé.
ÐÜ È?ÅòÐÊ ÎÖÖÔÔÅ 1.3ÏÅ ÐæÄÒ mod_mmap_static
È?ÅòÐ× ÁòÄÙÐË Ø?Ðõ×á ÀñÀ?Äé.
mod_file_cache
ÄÒ ÑæÌ-É? ÌÃÑ?ÏÅÌ- MMapFile
À? CacheFile
Ñ?ÍÓÎþÈ? Ë÷Ïû×ßÏ?
ÌÃÑ?×á Ñ?Ð? ÖÔÐßÅùÐË ÔÃÍ?ÏÅ Ð?Ðõ×áÄé.
È?Å÷ ×ÓÇÅÖ?ÐÜ ÅÞ Ñ?ÍÓÎþÈ? È?ÅÞ Ñ?Ï?×ßÄÒ ÀÝÐÊ ÎÖÄßÄé.
ÏÉÈ? ÅùÎþ, Ð?ÅÅÏüÑþÏû ÎÖÖÔÔÅÄÒ ×?Ð÷ MMapStatic
Ñ?ÍÓÎþÈ?
Ñ?Ï?×ßÑ? ÎÚÑ?ÈÈ, AIX ÀÀÐÊ ÄéÈ? ×ÓÇÅÖ?ÐÊ Åá È?ÅÞÈ? Ñ?Ï?×áÄé.
Ñ?Ï?×ßÑ?ÎÚÄÒ Ñ?ÍÓÎþÈ? Ë÷Ïû×â ÀöÏü Ì-É? ÏÐÇ? ÇÞÁçÏÅ ÏÐÇ?É?ÐË
ÃÂÁôÄé. Ñ?Ï?×ßÑ?ÎÚÄÒ Ñ?ÍÓÎþÈ? Ë÷Ïû×èÅÅ Ì-É?ÄÒ ÅÏÐë×ßÑ?ÈÈ
ÖÔÐßÐË ÔÃÍ?ÏÅ Ð?Ðõ×ßÑ? ÎÚÄÒÄé. ÅÞ Ñ?ÍÓÎþÈ? È?ÅÞ Ñ?Ï?×ßÄÒ
×ÓÇÅÖ?ÐË Ë÷Ïû×áÄéÈù ÎþÆ ÉöÍÔÐÜ Ä? ÑÑÐÊÑ? Í××ø×èÊÈÆ?.
mod_file_cache
Ð× MMapFile
Ñ?ÍÓÎþÄÒ
ÌÃÑ?×á Ñ?Ð? ÖÔÐßÅùÐË mmap()
ÍÓÍÊÕëØ?ÓòÐË
Ë÷Ïû×ßÏ? ÈîÈ?È?ÏÅ ÄûÐÐ×áÄé. ÓæÍÕ Ð?ÄàÍÊÇ? ÏþÏÅÓÌÑ?Æ?Èù
ÊÈÕû ÐÜ ÍÓÍÊÕëØ?ÓòÐÜ ÐæÑ?ÈÈ, Î?ÄÒ ÏþÏÅÓÌÑ?ÅÅ ÐæÄé. Æ×,
mmap()
×â Ì? ÐæÄÒ ÖÔÐß Õ?ÁòÏÝ ÀÃÌ?È? ÍÓÍÊÕëÐÜ
Ñ?×á×â Ì? ÐæÐÈÉ×ÇÞ ÉÜÈ? Í××ø×èÊÈÄÒ ÀÝÐÜ ÑÑÄé.
Ì-É?ÄÒ ÍÓÐë×âÆ?ÏÝ Ð÷ÍÓÐë×âÆ?ÈÈ mmap()
×áÄé.
ÁçÇÅÌ- ÖÔÐßÍÓÍÊÕëÏÅÌ- ×èÄ÷ ÖÔÐßÑï ×ßÃ?Æ?ÅÅ Ê?ÀöÅ×Èù Ì-É?È?
Ð÷ÍÓÐë×èÎï ×áÄé (ÑïÄìÀ?
Ð÷ÍÓÐë É?Ì- Ò?Àý). ÄéÍÓ ÈË×èÌ- ÖÔÐßÐÜ Ê?ÀöÅ×Î?ÄÒÅ?
Ì-É?È? Ð÷ÍÓÐë×ßÑ? ÎÚÐÈÈù ÏßÐ?Ø? ÐÜË?×ßÀä ÏôÓËÐË Ì-ÊåÍÊ×âÑ?ÅÅ
È?È?Äé. ÐÜÐ? ÖÔÐßÐË Ñ?ÏüÀý(unlink) Áç ÐêÈ?ÏÅ Ë?ÇÞÏþ ÖÔÐßÐË
ÈÈÅùÄÒ ÉöÍÔÐÈÇÞ ÖÔÐßÐË Ì?Ñ?×èÎï ×áÄé. rdist
Ã?
mv
ÏÝ ÀÀÐÊ ÄûÄéÌ?Ð× ÅÅÁÈÀÅ ÐÜÇÁ ÉöÍÔÐÈÇÞ ÅÏÐë×áÄé.
ÈÕÉ? ÓïÀÅÇÞ Êâ×ÚÏô×á stat()
ÀÛË÷ÀÅ ×ÚÏô×ßÀý
ÐäÓòÇÒ À?ÌâÆ?ÄÒ Ï?ÇÅ Ð×ÅÅÏÅ Éí×ßÁòÆ?É?ÏÅ ÐÜ È?ÅòÐÊ ÖÔÐßÐ×
Ê?Ø-È? É?ÍÓ×áÄé.
mod_file_cache
Ð× CacheFile
Ñ?ÍÓÎþÄÒ
ÌÃÑ? Ñ?ÍÓÎþÏÅ Ï-ÀÕ×á ÖÔÐß(À? ÖÔÐßÅù)ÐË Ï-ÎþÌ- ÖÔÐßÐ×
×êÅù(handle) Ø?ÐÊ ÖÔÐß ÁòÌ?Ðê(file descriptor)È?
ÔÃÍ?ÏÅ Ð?Ðõ×áÄé. ÖÔÐßÐË ÏôÓË×ßÈù Ì-É?ÄÒ ÔÃÍ?ÏÅÌ- ×êÅùÐË
Ó?ÎÖÌ- ÌâÔß API sendfile()
ÏÅ (Ð?ÅÅÏüÑþÏÅÌ-ÄÒ
TransmitFile()
) ÃáÁôÄé.
Ì-É?ÄÒ ÍÓÐë×âÆ?ÏÝ Ð÷ÍÓÐë×âÆ?ÈÈ ÖÔÐß ×êÅùÐË ÔÃÍ?×áÄé.
ÁçÇÅÌ- ÖÔÐßÍÓÍÊÕëÏÅÌ- ÔÃÍ?×á ÖÔÐßÑï ×ßÃ?Æ?ÅÅ Ê?ÀöÅ×Èù
Ì-É?È? Ð÷ÍÓÐë×èÎï ×áÄé (ÑïÄìÀ? Ð÷ÍÓÐë É?Ì- Ò?Àý).
ÄéÍÓ ÈË×èÌ- ÖÔÐßÐÜ Ê?ÀöÅ×Î?ÄÒÅ? Ì-É?È? Ð÷ÍÓÐë×ßÑ? ÎÚÐÈÈù
ÏßÐ?Ø? ÐÜË?×ßÀä ÏôÓËÐË Ì-ÊåÍÊ×âÑ?ÅÅ È?È?Äé. ÐÜÐ? ÖÔÐßÐË
Ñ?ÏüÀý(unlink) Áç ÐêÈ?ÏÅ Ë?ÇÞÏþ ÖÔÐßÐË ÈÈÅõÄÒ ÉöÍÔÐÈÇÞ
ÖÔÐßÐË Ì?Ñ?×èÎï ×áÄé. rdist
Ã? mv
ÏÝ
ÀÀÐÊ ÄûÄéÌ?Ð× ÅÅÁÈÀÅ ÐÜÇÁ ÉöÍÔÐÈÇÞ ÅÏÐë×áÄé.
Å?ÇÊÕôÈ?Ð× È?Å÷ ÖÔÐßÐË Ð÷ÁÝÐ?ÐÈÇÞ ÔÃÍ?ÏÅ Ð?Ðõ×ßÄÒ Ñ?ÍÓÎþÄÒ
Î?Äé. ÄûÍÕ ÄéÐÍÀ? ÀÀÐÜ ×èÊÈÆ?... Include
Ñ?ÍÓÎþÈ? Ò?Àý×ßÏ? ÄéÐÍÀ?
ÀÀÐÊ ÈýÇÙÎþÈ? Í××ð×áÄé:
find /www/htdocs -type f -print \
| sed -e 's/.*/mmapfile &/' > /www/conf/mmap.conf
ÌÃÈý: | ÍÓÐëÍÓ Ï?Ç? ÖÔÐß ×êÅùÐË ÔÃÍ?×áÄé |
---|---|
É?É: | CacheFile file-path [file-path] ... |
Ë÷ÏûÐõÌâ: | ÑæÌ-É?ÌÃÑ? |
Ë?ÕÒ: | Experimental |
È?Åò: | mod_file_cache |
CacheFile
Ñ?ÍÓÎþÄÒ Ì-É?ÀÅ ÍÓÐë×âÆ?
Ï?Ç? ÖÔÐßÐË Ï-Àý(open) ÖÔÐßÅùÐ× ×êÅùÐË ÔÃÍ?ÏÅ Ð?Ðõ×áÄé.
Ì-É? ÑÎÇñÍÓ ÐêÅÏÐÈÇÞ ÔÃÍ?×á ÖÔÐßÐ× ×êÅùÐË ÄíÄÒÄé(close).
ÖÔÐßÍÓÍÊÕëÏÅÌ- ÖÔÐßÐÜ Ê?ÀöÅ×Èù ÖÔÐßÐË ÄéÍÓ ÔÃÍ?×ßÁòÐ?×è
Ì-É?È? Ð÷ÍÓÐë×èÎï ×áÄé.
file-path ÎÖÁäÈåÖ?È? ÑÆÍÙ×èÆ?. ÎÖÁäÈåÖ?ÄÒ
ÎÖÖÔÔÅÐ× URL-ÖÔÐßÈý Ê?Ø? ×êÅùÇ?ÀÅ ÈÈÅ÷ ÖÔÐßÍÓÍÊÕë ÀöÇÞÏÝ
Ñ?Ø?Ø? ÐßÔÅ×èÎï ×áÄé. ×áÉ? Ä? Êâ×ÚÏô×á stat()
ÍÓÍÊÕëØ?ÓòÐÜ ×ÚÏô×ßÁòÆ?É?ÏÅ inodeÃ? ÍÙÊÌÈÅÕ? ÅþÐË
ÀöÇÞÈ? Ñ?Ñ?×â Ì? Î?Äé. ÐÜ È?ÅòÐÊ mod_alias
Ã?
mod_rewrite
ÇÞ Ð÷ÐëÌÊ×á ÖÔÐßÈýÐË ÄéÇú Ì?
ÐæÁòÅÅ Î?ÁòÅÅ ×ßÄé.
CacheFile /usr/local/apache/htdocs/index.html
ÌÃÈý: | ÍÓÐëÍÓ Ï?Ç? ÖÔÐßÐË ÈîÈ?È?ÏÅ ÄûÐÐ×áÄé |
---|---|
É?É: | MMapFile file-path [file-path] ... |
Ë÷ÏûÐõÌâ: | ÑæÌ-É?ÌÃÑ? |
Ë?ÕÒ: | Experimental |
È?Åò: | mod_file_cache |
MMapFile
Ñ?ÍÓÎþÄÒ Ì-É?ÀÅ ÍÓÐë×âÆ?
(À?ÉùÐÈÇÞ ÁÈÊà×á ÎÖÁäÈåÖ?ÇÞ Ñ?Ñ?×á) Ï?Ç? ÖÔÐßÐË ÈîÈ?È?ÏÅ
ÄûÐÐ×áÄé(map). Ì-É? ÑÎÇñÍÓ ÐêÅÏÐÈÇÞ ÄûÐÐÐË ×?Äé(unmap).
ÖÔÐßÍÓÍÊÕëÏÅÌ- ÖÔÐßÐÜ Ê?ÀöÅ×Èù ÖÔÐßÅùÐË ÄéÍÓ
mmap()
×ßÁòÐ?×è ÓæÌâ×á Ì-É?ÏÅ HUP
ÐÜÃ?
USR1
ÍÓÁçÃÞÐË ÊÈÃËÎï ×áÄé.
file-path ÎÖÁäÈåÖ?È? ÑÆÍÙ×èÆ?. ÎÖÁäÈåÖ?ÄÒ
ÎÖÖÔÔÅÐ× URL-ÖÔÐßÈý Ê?Ø? ×êÅùÇ?ÀÅ ÈÈÅ÷ ÖÔÐßÍÓÍÊÕë ÀöÇÞÏÝ
Ñ?Ø?Ø? ÐßÔÅ×èÎï ×áÄé. ×áÉ? Ä? Êâ×ÚÏô×á stat()
ÍÓÍÊÕëØ?ÓòÐÜ ×ÚÏô×ßÁòÆ?É?ÏÅ inodeÃ? ÍÙÊÌÈÅÕ? ÅþÐË
ÀöÇÞÈ? Ñ?Ñ?×â Ì? Î?Äé. ÐÜ È?ÅòÐÊ mod_alias
Ã?
mod_rewrite
ÇÞ Ð÷ÐëÌÊ×á ÖÔÐßÈýÐË ÄéÇú Ì?
ÐæÁòÅÅ Î?ÁòÅÅ ×ßÄé.
MMapFile /usr/local/apache/htdocs/index.html