1 <?xml version="1.0" encoding="EUC-KR" ?>
2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
4 <!-- English Revision: 1.8 -->
7 Copyright 2004 The Apache Software Foundation
9 Licensed under the Apache License, Version 2.0 (the "License");
10 you may not use this file except in compliance with the License.
11 You may obtain a copy of the License at
13 http://www.apache.org/licenses/LICENSE-2.0
15 Unless required by applicable law or agreed to in writing, software
16 distributed under the License is distributed on an "AS IS" BASIS,
17 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 See the License for the specific language governing permissions and
19 limitations under the License.
22 <modulesynopsis metafile="mod_example.xml.meta">
24 <name>mod_example</name>
25 <description>¾ÆÆÄÄ¡ ¸ðµâ API¸¦ ¼³¸íÇÑ´Ù</description>
26 <status>Experimental</status>
27 <sourcefile>mod_example.c</sourcefile>
28 <identifier>example_module</identifier>
31 <p>¾ÆÆÄÄ¡ ¹èÆ÷º» <code>modules/experimental</code> µð·ºÅ丮¿¡
32 ÀÖ´Â ÆÄÀϵéÀº ¾ÆÆÄÄ¡ API¸¦ »ç¿ëÇÏ¿© ¸ðµâÀ» ÀÛ¼ºÇÏ·Á´Â »ç¶÷µéÀ»
35 <p><code>mod_example.c</code>´Â ¸ðµç Äݹé(callback) ±¸Á¶¿Í
36 È£Ãâ ¹®¹ýÀ» ¼³¸íÇÏ´Â ÆÄÀÏÀÌ´Ù. ´ç½ÅÀº ¸ðµâ¿¡ ÀÌ ¸ðµç ÄݹéÀ»
37 ±¸ÇöÇÒ ÇÊ¿ä°¡ ¾ø´Ù. »ç½Ç Á¤¹Ý´ë´Ù!</p>
39 <p>example ¸ðµâÀº ½ÇÁ¦·Î µ¿ÀÛÇÏ´Â ¸ðµâÀÌ´Ù. ÀÌ ¸ðµâÀ» ¼¹ö¿¡
40 ¿¬°áÇÏ°í ƯÁ¤ À§Ä¡¿¡ "example-handler" Çڵ鷯¸¦ ÇÒ´çÇÏ¿©
41 ±×°÷À» ºê¶ó¿ì¡Çϸé example ¸ðµâÀÇ ¿©·¯ ÄݹéÀ» È®ÀÎÇÒ ¼ö
45 <section id="compiling"><title>example ¸ðµâ ÄÄÆÄÀÏÇϱâ</title>
47 <p>¼¹ö¿¡ example ¸ðµâÀ» Æ÷ÇÔÇÏ·Á¸é ´ÙÀ½ °úÁ¤À» °ÅÄ£´Ù:</p>
51 <code>--enable-example</code> ¿É¼Ç°ú ÇÔ²²
52 <code>configure</code>¸¦ ½ÇÇàÇÑ´Ù.</li>
54 <li>¼¹ö¸¦ ÄÄÆÄÀÏÇÑ´Ù ("<code>make</code>"¸¦ ½ÇÇàÇÑ´Ù).</li>
57 <p>ÀÚ½ÅÀÌ ¸¸µç ¸ðµâÀ» Ãß°¡ÇÏ·Á¸é:</p>
60 <li><code>cp modules/experimental/mod_example.c
61 modules/new_module/<em>mod_myexample.c</em></code></li>
63 <li>ÆÄÀÏÀ» ¼öÁ¤ÇÑ´Ù.</li>
65 <li><code>modules/new_module/config.m4</code> ÆÄÀÏÀ» ¸¸µç´Ù.
67 <li><code>APACHE_MODPATH_INIT(new_module)</code>À»
69 <li><code>modules/experimental/config.m4</code> ÆÄÀÏ¿¡¼
70 "example"ÀÌ ÀÖ´Â APACHE_MODULE ÁÙÀ» º¹»çÇؿ´Ù.</li>
71 <li>ù¹ø° ¾Æ±Ô¸ÕÆ® "example"À» <em>myexample</em>·Î
73 <li>µÎ¹ø° ¾Æ±Ô¸ÕÆ® ÀÚ¸®¿¡ ÀÚ½ÅÀÌ ¸¸µç ¸ðµâ¿¡ ´ëÇÑ
74 °£´ÜÇÑ ¼³¸íÀ» Àû´Â´Ù. <code>configure --help</code>¸¦
75 ½ÇÇàÇÏ¸é ¿©±â¿¡ ±â·ÏÇÑ ¼³¸íÀ» º¸¿©ÁØ´Ù.</li>
76 <li>¸ðµâÀ» ÄÄÆÄÀÏÇÒ¶§ Ưº°ÇÑ C ÄÄÆÄÀÏ·¯ ¿É¼Ç, ¸µÄ¿
77 ¿É¼Ç, ¶óÀ̺귯¸®°¡ ÇÊ¿äÇÏ¸é °¢°¢ CFLAGS, LDFLAGS,
78 LIBS¿¡ Ãß°¡ÇÑ´Ù. modules µð·ºÅ丮¿¡ ÀÖ´Â ´Ù¸¥
79 <code>config.m4</code> ÆÄÀϵéÀ» Âü°íÇ϶ó.</li>
80 <li><code>APACHE_MODPATH_FINISH</code>¸¦ Ãß°¡ÇÑ´Ù.</li>
84 <li><code>module/new_module/Makefile.in</code> ÆÄÀÏÀ»
85 ¸¸µç´Ù. ¸ðµâÀ» ÄÄÆÄÀÏÇϴµ¥ Ưº°ÇÑ ¸í·É¾î°¡ ÇÊ¿ä¾ø´Ù¸é,
86 ÆÄÀÏ¿¡ <code>include $(top_srcdir)/build/special.mk</code>¸¸
89 <li>ÃÖ»óÀ§ µð·ºÅ丮¿¡¼ ./buildconf ¸¦ ½ÇÇàÇÑ´Ù.</li>
91 <li>--enable-myexample ¿É¼ÇÀ» »ç¿ëÇÏ¿© ¼¹ö¸¦ ÄÄÆÄÀÏÇÑ´Ù</li>
96 <section id="using"><title><code>mod_example</code> ¸ðµâ »ç¿ëÇϱâ</title>
98 <p>example ¸ðµâÀ» »ç¿ëÇÏ·Á¸é <code>httpd.conf</code> ÆÄÀÏ¿¡
99 ´ÙÀ½°ú °°Àº ¼³Á¤À» Ãß°¡Ç϶ó:</p>
101 <Location /example-info><br />
102 SetHandler example-handler<br />
107 href="core.html#accessfilename"><code>.htaccess</code></a>
108 ÆÄÀÏ¿¡ ´ÙÀ½°ú °°Àº ³»¿ëÀ» Ãß°¡ÇÏ°í, ±× À§Ä¡¿¡¼ "test.example"
109 °°Àº ÆÄÀÏÀ» ¿äûÇ϶ó:</p>
111 AddHandler example-handler .example
114 <p>¼¹ö¸¦ Àç½ÃÀÛÇÑ ÈÄ ÀÌ À§Ä¡¸¦ ºê¶ó¿ì¡ÇÏ¸é ¾Õ¿¡¼ ¸»ÇÑ
115 ³»¿ëÀ» º¸°ÔµÉ °ÍÀÌ´Ù.</p>
120 <description>¾ÆÆÄÄ¡ ¸ðµâ API¸¦ ¼³¸íÇϱâÀ§ÇÑ ¿¹Á¦ Áö½Ã¾î</description>
121 <syntax>Example</syntax>
122 <contextlist><context>server config</context>
123 <context>virtual host</context><context>directory</context>
124 <context>.htaccess</context></contextlist>
127 <p><directive>Example</directive> Áö½Ã¾î´Â example ¸ðµâÀÇ
128 ³»¿ëÇڵ鷯°¡ °£´ÜÇÑ ¹®±¸¸¦ º¸ÀÏÁö ¿©ºÎ¸¦ ¼³Á¤ÇÑ´Ù. ÀÌ Áö½Ã¾î´Â
129 ¾Æ±Ô¸ÕÆ®¸¦ ¹ÞÁö¾Ê´Â´Ù. example ³»¿ëÇڵ鷯¸¦ Àû¿ëÇÑ URL¿¡
130 Á¢¼ÓÇÏ¸é ¹®¼ ¿äûÀ» ¼ºñ½ºÇϱâÀ§ÇØ ¸ðµâ¾È¿¡ ÇÔ¼öµéÀÌ ¾î¶»°Ô
131 ±×¸®°í ¾î¶² ¼ø¼·Î ºÒ¸®´ÂÁö ¾Ë ¼ö ÀÖ´Ù. ÀÌ Áö½Ã¾îÀÇ È¿°ú´Â
132 "<code>Example directive declared here: YES/NO</code>"·Î