<-
Apache > HTTP Server > Documentation > Version 2.4 > ���

����ġ ��� mod_example_hooks

������ ���:  en  |  fr  |  ko 

�� ������ �ֽ��� ������ �ƴմϴ�. �ֱٿ� ����� ������ ���� ������ �����ϼ���.
����:����ġ ��� API�� �����Ѵ�
����:Experimental
����:example_hooks_module
�ҽ�����:mod_example_hooks.c

���

����ġ ������ modules/examples ���丮�� �ִ� ���ϵ��� ����ġ API�� ����Ͽ� ����� �ۼ��Ϸ��� ������� �������� ������.

mod_example_hooks.c�� ��� �ݹ�(callback) ������ ȣ�� ������ �����ϴ� �����̴�. ����� ��⿡ �� ��� �ݹ��� ������ �ʿ䰡 ����. ��� ���ݴ��!

example ����� ������ �����ϴ� ����̴�. �� ����� ������ �����ϰ� Ư�� ��ġ�� "example-hooks-handler" �ڵ鷯�� �Ҵ��Ͽ� �װ��� ����¡�ϸ� example ����� ���� �ݹ��� Ȯ���� �� �ִ�.

���þ��

����

top

example ��� �������ϱ�

������ example ����� �����Ϸ��� ���� ������ ��ģ��:

  1. --enable-example-hooks �ɼǰ� �Բ� configure�� �����Ѵ�.
  2. ������ �������Ѵ� ("make"�� �����Ѵ�).

�ڽ��� ���� ����� �߰��Ϸ���:

  1. cp 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 ��� ����ϱ�

example ����� ����Ϸ��� apache2.conf ���Ͽ� ������ ���� ������ �߰��϶�:

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

�ƴϸ� .htaccess ���Ͽ� ������ ���� ������ �߰��ϰ�, �� ��ġ���� "test.example" ���� ������ ��û�϶�:

AddHandler example-hooks-handler .example

������ ������� �� �� ��ġ�� ����¡�ϸ� �տ��� ���� ������ ���Ե� ���̴�.

top

Example ���þ�

����:����ġ ��� API�� �����ϱ����� ���� ���þ�
����:Example
������:�ּ�������, ����ȣ��Ʈ, directory, .htaccess
����:Experimental
���:mod_example_hooks

Example ���þ�� example ����� �����ڵ鷯�� ������ ������ ������ ���θ� �����Ѵ�. �� ���þ�� �ƱԸ�Ʈ�� �����ʴ´�. example �����ڵ鷯�� ������ URL�� �����ϸ� ���� ��û�� �����ϱ����� ���ȿ� �Լ����� ��� �׸��� � ������ �Ҹ����� �� �� �ִ�. �� ���þ��� ȿ���� "Example directive declared here: YES/NO"�� Ȯ���� �� �ִ�.

������ ���:  en  |  fr  |  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.