<-
Apache > HTTP Server > Documentation > µâ

ÄÄ µâ mod_example_hooks 4v2q2g

ƢÉÇÑ î:  ko 

ÀÌ Â ÃÖÅÇ ÀÌ ÕÏÙ. ÃÖÙ ¯ƩµÈ »ëÀ µî ¦ ÂüíÇÏä.
í: ÄÄ µâ API¦ íÇÑÙ
»óÅÂ: Experimental
惡: example_hooks_module
ÒÄÀÏ: mod_example_hooks.c

äà 2z375a

ÄÄ è» modules/examples µÅä碯 ÀÖ ÄÀϵéÀ ÄÄ API¦ »çëÇÏ© µâÀ» ÀÛÇÏÁ »çҡµéÀ» µâÀÇÑ Á¦Ù.

mod_example_hooks.c µç ÄÝé(callback) ÁҢÍ È£Ãâ ýÀ» íÇÏ ÄÀÏÀÌÙ. çÅÀ µâ ÀÌ µç ÄÝéÀ» ÇöÇÒ ÇÊäƢ Ù. »çÇ ÁÝëÙ!

example µâÀ ÇÁ¦Î µÀÛÇÏ µâÀÌÙ. ÀÌ µâÀ» ö ¬áÇÏí ¯Á ÀÄ "example-hooks-handler" Çڵ鯦 ÇÒçÇÏ© ơÀ» êóìÂÇÏé example µâÀÇ ©¯ ÄÝéÀ» ÈÀÎÇÒ ö ÀÖÙ.

 Apache!

ÁÖÁ¦ 2c3c50

ÁöÃîµé 2l4o6j

Bugfix checklist 4i2533

Âüí 251y31

top

example µâ ÄÄÄÀÏÇÏâ 624k2u

ö example µâÀ» ÇÔÇÏÁé ÙÀ úÁÀ» ÅÄ£Ù:

  1. --enable-example-hooks ÉÇú ÇÔ configure¦ ÇÇàÇÑÙ.
  2. ö¦ ÄÄÄÀÏÇÑÙ ("make"¦ ÇÇàÇÑÙ).

ÀÚÅÀÌ µç µâÀ» ÃƢÇÏÁé:

  1. modules/examples/mod_example_hooks.c modules/new_module/mod_myexample.c
  2. ÄÀÏÀ» öÁÇÑÙ.
  3. modules/new_module/config.m4 ÄÀÏÀ» µçÙ.
    1. APACHE_MODPATH_INIT(new_module)À» ÃƢÇÑÙ.
    2. modules/examples/config.m4 ÄÀÏ "example_hooks"ÀÌ ÀÖ APACHE_MODULE ÁÙÀ» »çÇÂÙ.
    3. ÃÂ ÔÕ "example_hooks"À» myexampleÎ ¯ƩÇÑÙ.
    4. µÎ ÔÕ ÀÚ碯 ÀÚÅÀÌ µç µâ ëÇÑ £ÜÇÑ íÀ» ÀûÂÙ. configure --help¦ ÇÇàÇÏé ©â âÏÇÑ íÀ» ©ÁÙ.
    5. µâÀ» ÄÄÄÀÏÇÒҡ ¯ÇÑ C ÄÄÄÀϯ ÉÇ, µÄ ÉÇ, óÀÌê¯Ƣ ÇÊäÇÏé ¢¢ CFLAGS, LDFLAGS, LIBS ÃƢÇÑÙ. modules µÅä碯 ÀÖ ٥ config.m4 ÄÀϵéÀ» ÂüíÇÏó.
    6. APACHE_MODPATH_FINISH¦ ÃƢÇÑÙ.
  4. module/new_module/Makefile.in ÄÀÏÀ» µçÙ. µâÀ» ÄÄÄÀÏÇϵ¥ ¯ÇÑ íÉîƢ ÇÊäÙé, ÄÀÏ include $(top_srcdir)/build/special.mk ÀÖîµµ µÈÙ.
  5. ÃÖ»óÀ µÅä碯 ./buildconf ¦ ÇÇàÇÑÙ.
  6. --enable-myexample ÉÇÀ» »çëÇÏ© ö¦ ÄÄÄÀÏÇÑÙ
top

mod_example_hooks µâ »çëÇÏâ 365l60

example µâÀ» »çëÇÏÁé apache2.conf ÄÀÏ ÙÀú ơÀ ÁÀ» ÃƢÇÏó:

<Location /example-hooks-info>
SetHandler example-hooks-handler
</Location>

Ïé .htaccess ÄÀÏ ÙÀú ơÀ »ëÀ» ÃƢÇÏí, ÀÄ "test.example" ơÀ ÄÀÏÀ» äûÇÏó:

AddHandler example-hooks-handler .example

ö¦ ÀçÃÀÛÇÑ ÈÄ ÀÌ ÀĦ êóìÂÇÏé Õ »ÇÑ »ëÀ» ﵃ ÍÀÌÙ.

top

Example ÁöÃî 1m2d3c

í: ÄÄ µâ API¦ íÇÏâÀÇÑ Á¦ ÁöÃî
ý: Example
»çëÀåÒ: ÁÖöÁ, Ƣ»óÈ£, directory, .htaccess
»óÅÂ: Experimental
µâ: mod_example_hooks

Example ÁöÃî example µâÀÇ »ëÇÚµé¯Ƣ £ÜÇÑ 硾¦ ÀÏÁö ©Î¦ ÁÇÑÙ. ÀÌ ÁöÃî ÔÕ碬¦ ÁöÊÂÙ. example »ëÇڵ鯦 ÀûëÇÑ URL Á¢ÓÇÏé äûÀ» ñÇÏâÀÇ µâÈ ÇÔöµéÀÌ î»Ô í îҩ Î Ò碥ÂÁö Ë ö ÀÖÙ. ÀÌ ÁöÃîÀÇ Èú "Example directive declared here: YES/NO"Î ÈÀÎÇÒ ö ÀÖÙ.

ƢÉÇÑ î:  ko 

top

Comments 2p1l6j

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 by our s 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 Libera.chat, or sent to our mailing lists.