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: 105989:1330988 (outdated) -->
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
14 http://www.apache.org/licenses/LICENSE-2.0
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
23 <modulesynopsis metafile="mod_example.xml.meta">
25 <name>mod_example</name>
26 <description>¾ÆÆÄÄ¡ ¸ðµâ API¸¦ ¼³¸íÇÑ´Ù</description>
27 <status>Experimental</status>
28 <sourcefile>mod_example.c</sourcefile>
29 <identifier>example_module</identifier>
32 <p>¾ÆÆÄÄ¡ ¹èÆ÷º» <code>modules/experimental</code> µð·ºÅ丮¿¡
33 ÀÖ´Â ÆÄÀϵéÀº ¾ÆÆÄÄ¡ API¸¦ »ç¿ëÇÏ¿© ¸ðµâÀ» ÀÛ¼ºÇÏ·Á´Â »ç¶÷µéÀ»
36 <p><code>mod_example.c</code>´Â ¸ðµç Äݹé(callback) ±¸Á¶¿Í
37 È£Ãâ ¹®¹ýÀ» ¼³¸íÇÏ´Â ÆÄÀÏÀÌ´Ù. ´ç½ÅÀº ¸ðµâ¿¡ ÀÌ ¸ðµç ÄݹéÀ»
38 ±¸ÇöÇÒ ÇÊ¿ä°¡ ¾ø´Ù. »ç½Ç Á¤¹Ý´ë´Ù!</p>
40 <p>example ¸ðµâÀº ½ÇÁ¦·Î µ¿ÀÛÇÏ´Â ¸ðµâÀÌ´Ù. ÀÌ ¸ðµâÀ» ¼¹ö¿¡
41 ¿¬°áÇÏ°í ƯÁ¤ À§Ä¡¿¡ "example-handler" Çڵ鷯¸¦ ÇÒ´çÇÏ¿©
42 ±×°÷À» ºê¶ó¿ì¡Çϸé example ¸ðµâÀÇ ¿©·¯ ÄݹéÀ» È®ÀÎÇÒ ¼ö
46 <section id="compiling"><title>example ¸ðµâ ÄÄÆÄÀÏÇϱâ</title>
48 <p>¼¹ö¿¡ example ¸ðµâÀ» Æ÷ÇÔÇÏ·Á¸é ´ÙÀ½ °úÁ¤À» °ÅÄ£´Ù:</p>
52 <code>--enable-example</code> ¿É¼Ç°ú ÇÔ²²
53 <code>configure</code>¸¦ ½ÇÇàÇÑ´Ù.</li>
55 <li>¼¹ö¸¦ ÄÄÆÄÀÏÇÑ´Ù ("<code>make</code>"¸¦ ½ÇÇàÇÑ´Ù).</li>
58 <p>ÀÚ½ÅÀÌ ¸¸µç ¸ðµâÀ» Ãß°¡ÇÏ·Á¸é:</p>
61 <li><code>cp modules/experimental/mod_example.c
62 modules/new_module/<em>mod_myexample.c</em></code></li>
64 <li>ÆÄÀÏÀ» ¼öÁ¤ÇÑ´Ù.</li>
66 <li><code>modules/new_module/config.m4</code> ÆÄÀÏÀ» ¸¸µç´Ù.
68 <li><code>APACHE_MODPATH_INIT(new_module)</code>À»
70 <li><code>modules/experimental/config.m4</code> ÆÄÀÏ¿¡¼
71 "example"ÀÌ ÀÖ´Â APACHE_MODULE ÁÙÀ» º¹»çÇؿ´Ù.</li>
72 <li>ù¹ø° ¾Æ±Ô¸ÕÆ® "example"À» <em>myexample</em>·Î
74 <li>µÎ¹ø° ¾Æ±Ô¸ÕÆ® ÀÚ¸®¿¡ ÀÚ½ÅÀÌ ¸¸µç ¸ðµâ¿¡ ´ëÇÑ
75 °£´ÜÇÑ ¼³¸íÀ» Àû´Â´Ù. <code>configure --help</code>¸¦
76 ½ÇÇàÇÏ¸é ¿©±â¿¡ ±â·ÏÇÑ ¼³¸íÀ» º¸¿©ÁØ´Ù.</li>
77 <li>¸ðµâÀ» ÄÄÆÄÀÏÇÒ¶§ Ưº°ÇÑ C ÄÄÆÄÀÏ·¯ ¿É¼Ç, ¸µÄ¿
78 ¿É¼Ç, ¶óÀ̺귯¸®°¡ ÇÊ¿äÇÏ¸é °¢°¢ CFLAGS, LDFLAGS,
79 LIBS¿¡ Ãß°¡ÇÑ´Ù. modules µð·ºÅ丮¿¡ ÀÖ´Â ´Ù¸¥
80 <code>config.m4</code> ÆÄÀϵéÀ» Âü°íÇ϶ó.</li>
81 <li><code>APACHE_MODPATH_FINISH</code>¸¦ Ãß°¡ÇÑ´Ù.</li>
85 <li><code>module/new_module/Makefile.in</code> ÆÄÀÏÀ»
86 ¸¸µç´Ù. ¸ðµâÀ» ÄÄÆÄÀÏÇϴµ¥ Ưº°ÇÑ ¸í·É¾î°¡ ÇÊ¿ä¾ø´Ù¸é,
87 ÆÄÀÏ¿¡ <code>include $(top_srcdir)/build/special.mk</code>¸¸
90 <li>ÃÖ»óÀ§ µð·ºÅ丮¿¡¼ ./buildconf ¸¦ ½ÇÇàÇÑ´Ù.</li>
92 <li>--enable-myexample ¿É¼ÇÀ» »ç¿ëÇÏ¿© ¼¹ö¸¦ ÄÄÆÄÀÏÇÑ´Ù</li>
97 <section id="using"><title><code>mod_example</code> ¸ðµâ »ç¿ëÇϱâ</title>
99 <p>example ¸ðµâÀ» »ç¿ëÇÏ·Á¸é <code>httpd.conf</code> ÆÄÀÏ¿¡
100 ´ÙÀ½°ú °°Àº ¼³Á¤À» Ãß°¡Ç϶ó:</p>
102 <Location /example-info><br />
103 SetHandler example-handler<br />
108 href="core.html#accessfilename"><code>.htaccess</code></a>
109 ÆÄÀÏ¿¡ ´ÙÀ½°ú °°Àº ³»¿ëÀ» Ãß°¡ÇÏ°í, ±× À§Ä¡¿¡¼ "test.example"
110 °°Àº ÆÄÀÏÀ» ¿äûÇ϶ó:</p>
112 AddHandler example-handler .example
115 <p>¼¹ö¸¦ Àç½ÃÀÛÇÑ ÈÄ ÀÌ À§Ä¡¸¦ ºê¶ó¿ì¡ÇÏ¸é ¾Õ¿¡¼ ¸»ÇÑ
116 ³»¿ëÀ» º¸°ÔµÉ °ÍÀÌ´Ù.</p>
121 <description>¾ÆÆÄÄ¡ ¸ðµâ API¸¦ ¼³¸íÇϱâÀ§ÇÑ ¿¹Á¦ Áö½Ã¾î</description>
122 <syntax>Example</syntax>
123 <contextlist><context>server config</context>
124 <context>virtual host</context><context>directory</context>
125 <context>.htaccess</context></contextlist>
128 <p><directive>Example</directive> Áö½Ã¾î´Â example ¸ðµâÀÇ
129 ³»¿ëÇڵ鷯°¡ °£´ÜÇÑ ¹®±¸¸¦ º¸ÀÏÁö ¿©ºÎ¸¦ ¼³Á¤ÇÑ´Ù. ÀÌ Áö½Ã¾î´Â
130 ¾Æ±Ô¸ÕÆ®¸¦ ¹ÞÁö¾Ê´Â´Ù. example ³»¿ëÇڵ鷯¸¦ Àû¿ëÇÑ URL¿¡
131 Á¢¼ÓÇÏ¸é ¹®¼ ¿äûÀ» ¼ºñ½ºÇϱâÀ§ÇØ ¸ðµâ¾È¿¡ ÇÔ¼öµéÀÌ ¾î¶»°Ô
132 ±×¸®°í ¾î¶² ¼ø¼·Î ºÒ¸®´ÂÁö ¾Ë ¼ö ÀÖ´Ù. ÀÌ Áö½Ã¾îÀÇ È¿°ú´Â
133 "<code>Example directive declared here: YES/NO</code>"·Î