1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
|
<?xml version='1.0' encoding='EUC-KR' ?>
<!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
<!-- English Revision: 103421 -->
<!--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manualpage metafile="htaccess.xml.meta">
<parentdocument href="./">How-To / Tutorials</parentdocument>
<title>¾ÆÆÄÄ¡ ÅõÅ丮¾ó: .htaccess ÆÄÀÏ</title>
<summary>
<p><code>.htaccess</code> ÆÄÀÏÀ» »ç¿ëÇÏ¿© µð·ºÅ丮º°·Î ¼³Á¤À»
º¯°æÇÒ ¼ö ÀÖ´Ù.</p>
</summary>
<section id="related"><title>.htaccess ÆÄÀÏ</title>
<related>
<modulelist>
<module>core</module>
<module>mod_authn_file</module>
<module>mod_authz_groupfile</module>
<module>mod_cgi</module>
<module>mod_include</module>
<module>mod_mime</module>
</modulelist>
<directivelist>
<directive module="core">AccessFileName</directive>
<directive module="core">AllowOverride</directive>
<directive module="core">Options</directive>
<directive module="mod_mime">AddHandler</directive>
<directive module="core">SetHandler</directive>
<directive module="core">AuthType</directive>
<directive module="core">AuthName</directive>
<directive module="mod_authn_file">AuthUserFile</directive>
<directive module="mod_authz_groupfile">AuthGroupFile</directive>
<directive module="core">Require</directive>
</directivelist>
</related>
</section>
<section id="what">
<title>¹«¾ùÀ̸ç/¾î¶»°Ô »ç¿ëÇϴ°¡</title>
<p><code>.htaccess</code> ÆÄÀÏ(ȤÀº "ºÐ»ê ¼³Á¤ÆÄÀÏ")À»
»ç¿ëÇÏ¸é µð·ºÅ丮º°·Î ¼³Á¤À» º¯°æÇÒ ¼ö ÀÖ´Ù. ¿©·¯ ¼³Á¤ Áö½Ã¾î°¡
ÀÖ´Â ÆÄÀÏÀ» ƯÁ¤ ¹®¼ µð·ºÅ丮¿¡ µÎ¸é, ±× µð·ºÅ丮¿Í ¸ðµç
ÇÏÀ§µð·ºÅ丮¿¡ Áö½Ã¾î¸¦ Àû¿ëÇÑ´Ù.</p>
<note><title>ÁÖÀÇ:</title>
<p><code>.htaccess</code> ÆÄÀϸíÀ» ´Ù¸£°Ô »ç¿ëÇÏ°í ½Í´Ù¸é,
<directive module="core">AccessFileName</directive> Áö½Ã¾î¸¦
»ç¿ëÇÏ¿© º¯°æÇÒ ¼ö ÀÖ´Ù. ¿¹¸¦ µé¾î, <code>.config</code>
ÆÄÀϸíÀ» »ç¿ëÇÏ·Á¸é ¼¹ö ¼³Á¤ÆÄÀÏ¿¡ ´ÙÀ½°ú °°ÀÌ Ãß°¡ÇÑ´Ù.</p>
<example>
AccessFileName .config
</example>
</note>
<p>ÀϹÝÀûÀ¸·Î <code>.htaccess</code> ÆÄÀÏÀº <a
href="../configuring.html#syntax">ÁÖ¼³Á¤ÆÄÀÏ</a>°ú ¹®¹ýÀÌ
°°´Ù. <directive module="core">AllowOverride</directive>
Áö½Ã¾î°¡ ÀÌ ÆÄÀÏ¿¡ ³ª¿Ã ¼ö ÀÖ´Â ³»¿ëÀ» °áÁ¤ÇÑ´Ù. ÀÌ Áö½Ã¾î´Â
<code>.htaccess</code> ÆÄÀÏ¿¡¼ Çã¿ëÇÏ´Â Áö½Ã¾î ºÐ·ù¸¦ ÁöÁ¤ÇÑ´Ù.
Áö½Ã¾î¸¦ <code>.htaccess</code> ÆÄÀÏ¿¡¼ »ç¿ëÇÒ ¼ö ÀÖ´Ù¸é,
ÇØ´ç Áö½Ã¾î ¹®¼ÀÇ Override Ç׸ñÀº Áö½Ã¾î¸¦ Çã¿ëÇϱâÀ§ÇØ
<directive module="core">AllowOverride</directive>¿¡ »ç¿ëÇÒ
°ªÀ» ¾Ë·ÁÁØ´Ù.</p>
<p>¿¹¸¦ µé¾î, <directive module="core">AddDefaultCharset</directive>
Áö½Ã¾î ¹®¼¸¦ º¸¸é ÀÌ Áö½Ã¾î¸¦ <code>.htaccess</code> ÆÄÀÏ¿¡¼
»ç¿ëÇÒ ¼ö ÀÖ´Ù. (Áö½Ã¾î ¿ä¾à¿¡¼ »ç¿ëÀå¼Ò Ç׸ñÀ» º¸¶ó.)
<a href="../mod/directive-dict.html#Context">Override</a>
ÁÙ¿¡ <code>FileInfo</code>°¡ ÀÖ´Ù. ±×·¡¼ ÀÌ Áö½Ã¾î¸¦
<code>.htaccess</code> ÆÄÀÏ¿¡¼ »ç¿ëÇϱâÀ§Çؼ´Â ÃÖ¼ÒÇÑ
<code>AllowOverride FileInfo</code>°¡ ÇÊ¿äÇÏ´Ù.</p>
<example><title>¿¹Á¦:</title>
<table>
<tr>
<td><a
href="../mod/directive-dict.html#Context">»ç¿ëÀå¼Ò:</a></td>
<td>ÁÖ¼¹ö¼³Á¤, °¡»óÈ£½ºÆ®, directory, .htaccess</td>
</tr>
<tr>
<td><a
href="../mod/directive-dict.html#Override">Override:</a></td>
<td>FileInfo</td>
</tr>
</table>
</example>
<p>ƯÁ¤ Áö½Ã¾î¸¦ <code>.htaccess</code> ÆÄÀÏ¿¡¼ »ç¿ëÇÒ
¼ö ÀÖ´ÂÁö ±Ã±ÝÇϸé Áö½Ã¾î ¹®¼ÀÇ »ç¿ëÀå¼Ò Ç׸ñ¿¡ ".htaccess"°¡
ÀÖ´ÂÁö È®ÀÎÇÑ´Ù.</p>
</section>
<section id="when"><title>¾ðÁ¦ .htaccess ÆÄÀÏÀ» »ç¿ëÇϳª
(ȤÀº »ç¿ëÇÏÁö ¾Ê³ª)</title>
<p>ÀϹÝÀûÀ¸·Î ÁÖ¼¹öÆÄÀÏ¿¡ Á¢±ÙÇÒ ¼ö ¾ø´Â °æ¿ì°¡ ¾Æ´Ï¶ó¸é
<code>.htaccess</code> ÆÄÀÏÀ» »ç¿ëÇÏ¸é ¾ÈµÈ´Ù. ¿¹¸¦ µé¾î,
»ç¿ëÀÚ ÀÎÁõÀÌ Ç×»ó <code>.htaccess</code> ÆÄÀÏ¿¡ ÀÖ¾î¾ß
ÇÑ´Ù´Â °ÍÀº À߸ø ¾Ë·ÁÁø ¿ÀÇØ´Ù. ÀÌ´Â »ç½ÇÀÌ ¾Æ´Ï´Ù. ÁÖ¼¹ö¼³Á¤¿¡
»ç¿ëÀÚ ÀÎÁõ ¼³Á¤À» ÀûÀ» ¼ö ÀÖ°í, »ç½Ç ÀÌ·¯±æ ±ÇÇÑ´Ù.</p>
<p><code>.htaccess</code> ÆÄÀÏÀº ÄÁÅÙÃ÷ Á¦°øÀÚ°¡ µð·ºÅ丮º°·Î
¼¹ö ¼³Á¤À» ´Ù¸£°ÔÇÏ°í ½ÍÁö¸¸ ¼¹ö ½Ã½ºÅÛ¿¡ root ±ÇÇÑÀÌ
¾ø´Â °æ¿ì¿¡ »ç¿ëÇÑ´Ù. ¼¹ö °ü¸®ÀÚ°¡ ¼³Á¤À» ÀÚÁÖ º¯°æÇÏ°í
½ÍÁö ¾ÊÀº °æ¿ì ÀÏ¹Ý »ç¿ëÀÚ°¡ Á÷Á¢ <code>.htaccess</code>
ÆÄÀÏÀ» ¼öÁ¤Çϵµ·Ï Çã¿ëÇÏ´Â °ÍÀÌ ¹Ù¶÷Á÷ÇÏ´Ù. ¿¹¸¦ µé¾î, ÇÑ
ÄÄÇ»ÅÍ¿¡ ¿©·¯ »ç¿ëÀÚ »çÀÌÆ®¸¦ ¼ºñ½ºÇÏ´Â ISP¿¡¼ »ç¿ëÀÚ°¡
ÀÚ½ÅÀÇ ¼³Á¤À» º¯°æÇÏ°í ½ÍÀº °æ¿ì°¡ ±×·¯ÇÏ´Ù.</p>
<p>±×·¯³ª ÀϹÝÀûÀ¸·Î <code>.htaccess</code> ÆÄÀÏÀº °¡±ÞÀû
ÇÇÇØ¾ß ÇÑ´Ù. <code>.htaccess</code> ÆÄÀÏ¿¡¼ Çã¿ëÇÏ´Â Áö½Ã¾î´Â
ÁÖ¼³Á¤ÆÄÀÏÀÇ <directive module="core"
type="section">Directory</directive> ¼½¼Ç°ú °°Àº È¿°ú°¡
ÀÖ´Ù.</p>
<p>´ÙÀ½ µÎ°¡Áö Å« ÀÌÀ¯¶§¹®¿¡ <code>.htaccess</code> ÆÄÀÏ
»ç¿ëÀ» ÇÇÇØ¾ß ÇÑ´Ù.</p>
<p>ù¹ø°´Â ¼º´ÉÀÌ´Ù. <directive
module="core">AllowOverride</directive>°¡ <code>.htaccess</code>
ÆÄÀÏÀ» »ç¿ëÇϵµ·Ï Çã¿ëÇϸé, ¾ÆÆÄÄ¡´Â µð·ºÅ丮¸¶´Ù
<code>.htaccess</code> ÆÄÀÏÀ» ã´Â´Ù. ±×·¡¼
<code>.htaccess</code> ÆÄÀÏÀ» Çã¿ëÇÏ¸é ½ÇÁ¦·Î ÆÄÀÏÀ» »ç¿ëÇÏÁö
¾Ê´Â °æ¿ì¿¡µµ ¼º´ÉÀÌ ¶³¾îÁø´Ù! ¶Ç, <code>.htaccess</code>
ÆÄÀÏÀº ¹®¼¸¦ ¿äûÇÒ¶§¸¶´Ù ÀоîµéÀδÙ.</p>
<p>°Ô´Ù°¡ Àû¿ëÇØ¾ß ÇÏ´Â Àüü Áö½Ã¾î¸¦ ¸ðÀ¸±âÀ§ÇØ ¾ÆÆÄÄ¡´Â
¸ðµç »óÀ§ µð·ºÅ丮¿¡¼ <code>.htaccess</code> ÆÄÀÏÀ» ã´Â´Ù.
(<a href="#how">¾î¶»°Ô Áö½Ã¾î¸¦ Àû¿ëÇϳª</a> ÀýÀ» Âü°í.)
±×·¡¼ <code>/www/htdocs/example</code> µð·ºÅ丮¿¡ ÀÖ´Â
ÆÄÀÏÀ» ¿äûÇϸé, ¾ÆÆÄÄ¡´Â ´ÙÀ½ ÆÄÀϵéÀ» ã¾Æ¾ß ÇÑ´Ù.</p>
<example>
/.htaccess<br />
/www/.htaccess<br />
/www/htdocs/.htaccess<br />
/www/htdocs/example/.htaccess
</example>
<p>±×·¡¼ ±× µð·ºÅ丮¿¡ ÀÖ´Â ÆÄÀÏÀ» Á¢±ÙÇÒ ¶§¸¶´Ù ¼³Á¤ÆÄÀÏÀÌ
ÀüÇô ¾ø¾îµµ ÆÄÀϽýºÅÛÀ» 4¹ø ´õ Á¢±ÙÇØ¾ß ÇÑ´Ù.
(<code>/</code>¿¡¼µµ <code>.htaccess</code> ÆÄÀÏÀ» Çã¿ëÇÑ
°æ¿ì¸¦ ¸»ÇÑ´Ù. º¸ÅëÀº Çã¿ëÇÏÁö ¾Ê´Â´Ù.)</p>
<p>µÎ¹ø° ÀÌÀ¯´Â º¸¾ÈÀÌ´Ù. »ç¿ëÀÚ¿¡°Ô ¼¹ö¼³Á¤ º¯°æ ±ÇÇÑÀ»
ÁÖ¸é ´ç½ÅÀÌ °¨´çÇÒ ¼ö ¾ø´Â º¯È°¡ ÀϾ ¼ö ÀÖ´Ù. »ç¿ëÀÚ¿¡°Ô
ÀÌ·± ±ÇÇÑÀ» ÁÙÁö °õ°õÀÌ »ý°¢Ç϶ó. ¶Ç, »ç¿ëÀÚ°¡ ¿øÇÏ´Â °Íº¸´Ù
ÀûÀº ±ÇÇÑÀ» ÁÖ¸é ±â¼úÁö¿ø¿äûÀÌ µé¾î¿Â´Ù. »ç¿ëÀÚ¿¡°Ô °¡´ÉÇÑ
±ÇÇÑ ¼öÁØÀ» ¸íÈ®È÷ ¾Ë·Á¶ó. »ç¿ëÀÚ¿¡°Ô <directive
module="core">AllowOverride</directive>¸¦ ¾î¶»°Ô ¼³Á¤ÇÏ¿´´ÂÁö
Á¤È®È÷ ¾Ë¸®°í °ü·Ã ¹®¼¸¦ Á¦°øÇÏ¸é ¾ÕÀ¸·Î È¥¶õÀ» ÇÇÇÒ ¼ö
ÀÖ´Ù.</p>
<p>Áö½Ã¾î¸¦ <code>/www/htdocs/example</code> µð·ºÅ丮ÀÇ
<code>.htaccess</code> ÆÄÀÏÀ» µÎ´Â °Í°ú ÁÖ¼¹ö¼³Á¤ÀÇ
<code><Directory /www/htdocs/example></code> Directory
¼³Á¤¿¡ µÎ´Â °ÍÀº ¿ÏÀüÈ÷ °°´Ù.</p>
<p><code>/www/htdocs/example</code>¿¡ ÀÖ´Â
<code>.htaccess</code> ¼½¼Ç:</p>
<example><title><code>/www/htdocs/example</code>¿¡ ÀÖ´Â
.htaccess ÆÄÀÏ ³»¿ë</title>
AddType text/example .exm
</example>
<example><title><code>httpd.conf</code> ÆÄÀÏ¿¡ ÀÖ´Â ¼½¼Ç</title>
<Directory /www/htdocs/example><br />
<indent>
AddType text/example .exm<br />
</indent>
</Directory>
</example>
<p>±×·¯³ª ÆÄÀÏÀ» ¿äûÇÒ ¶§¸¶´Ù ¼³Á¤À» ÀÐÁö¾Ê°í ¾ÆÆÄÄ¡°¡
½ÃÀÛÇÒ¶§ Çѹø¸¸ ¼³Á¤À» Àб⶧¹®¿¡ °°Àº ¼³Á¤À» ¼¹ö¼³Á¤ÆÄÀÏ¿¡
»ç¿ëÇÏ¸é ¼º´ÉÀÌ ´õ ºü¸£´Ù.</p>
<p><directive module="core">AllowOverride</directive> Áö½Ã¾î¸¦
<code>none</code>À¸·Î ¼³Á¤Çϸé <code>.htaccess</code> ÆÄÀÏÀ»
¿ÏÀüÈ÷ »ç¿ëÇÒ ¼ö ¾ø´Ù.</p>
<example>
AllowOverride None
</example>
</section>
<section id="how"><title>¾î¶»°Ô Áö½Ã¾î¸¦ Àû¿ëÇϳª</title>
<p><code>.htaccess</code> ÆÄÀÏÀ» ¹ß°ßÇÑ µð·ºÅ丮¿Í ±× µð·ºÅ丮ÀÇ
¸ðµç ÇÏÀ§µð·ºÅ丮¿¡ <code>.htaccess</code> ÆÄÀÏ¿¡ ÀÖ´Â ¼³Á¤
Áö½Ã¾î¸¦ Àû¿ëÇÑ´Ù. ±×·¡¼ »óÀ§µð·ºÅ丮ÀÇ <code>.htaccess</code>
ÆÄÀÏÀ» ÁÖÀÇÇØ¾ß ÇÑ´Ù. ¹ß°ßÇÑ ¼ø¼·Î Áö½Ã¾î¸¦ Àû¿ëÇÑ´Ù. ƯÁ¤
µð·ºÅ丮¿¡ ÀÖ´Â <code>.htaccess</code> ÆÄÀÏÀº »óÀ§µð·ºÅ丮¿¡
ÀÖ´Â <code>.htaccess</code> ÆÄÀÏÀÇ Áö½Ã¾î¸¦ ¹«È¿·Î ¸¸µé
¼ö ÀÖ°í, »óÀ§µð·ºÅ丮¿¡ ÀÖ´Â Áö½Ã¾î´Â ´õ »óÀ§µð·ºÅ丮 ȤÀº
ÁÖ¼³Á¤ÆÄÀÏ¿¡ ÀÖ´Â Áö½Ã¾î¸¦ ¹«È¿·Î ¸¸µé ¼ö ÀÖ´Ù.</p>
<p>¿¹Á¦:</p>
<p><code>/www/htdocs/example1</code> µð·ºÅ丮¿¡ ´ÙÀ½°ú °°Àº
<code>.htaccess</code> ÆÄÀÏÀÌ ÀÖ´Ù.</p>
<example>
Options +ExecCGI
</example>
<p>(ÁÖÀÇ: <code>.htaccess</code> ÆÄÀÏ¿¡ "<directive
module="core">Options</directive>" Áö½Ã¾î¸¦ »ç¿ëÇÏ·Á¸é
"<code>AllowOverride Options</code>"°¡ ÇÊ¿äÇÏ´Ù.)</p>
<p><code>/www/htdocs/example1/example2</code> µð·ºÅ丮¿¡´Â
´ÙÀ½°ú °°Àº <code>.htaccess</code> ÆÄÀÏÀÌ ÀÖ´Ù.</p>
<example>
Options Includes
</example>
<p>ÀÌ µÎ¹ø° <code>.htaccess</code> ÆÄÀÏÀÇ
<code>Options Includes</code>°¡ ÀÌÀü ¼³Á¤À» ¿ÏÀüÈ÷ ¹«È¿·Î
¸¸µé±â¶§¹®¿¡ <code>/www/htdocs/example1/example2</code>
µð·ºÅ丮´Â CGI ½ÇÇàÀ» Çã¿ëÇÏÁö ¾Ê´Â´Ù.</p>
</section>
<section id="auth"><title>ÀÎÁõ ¿¹Á¦</title>
<p>ÀÎÁõ ¹æ¹ýÀ» ¾Ë±âÀ§ÇØ ¹Ù·Î ÀÌ°÷ºÎÅÍ Àд´ٸé ÁÖÀÇÇÒ °ÍÀÌ
ÀÖ´Ù. ¾ÏÈ£ ÀÎÁõÀ» ÇÏ·Á¸é <code>.htaccess</code> ÆÄÀÏÀÌ
ÇÊ¿äÇÏ´Ù´Â ¿ÀÇØ°¡ ³Î¸® ÆÛÁ®ÀÖ´Ù. ÀÌ´Â »ç½ÇÀÌ ¾Æ´Ï´Ù.
ÁÖ¼³Á¤ÆÄÀÏÀÇ <directive module="core"
type="section">Directory</directive> ¼½¼Ç¿¡ ÀÎÁõ Áö½Ã¾î¸¦
µÎ´Â °ÍÀÌ ´õ ±ÇÀåÇÏ´Â ¹æ¹ýÀÌ°í, ¼¹öÀÇ ÁÖ¼³Á¤ÆÄÀÏÀ» ¼öÁ¤ÇÒ
¼ö ¾ø´Â °æ¿ì¿¡¸¸ <code>.htaccess</code> ÆÄÀÏÀ» »ç¿ëÇؾß
ÇÑ´Ù. ¾ðÁ¦ <code>.htaccess</code> ÆÄÀÏÀ» »ç¿ëÇØ¾ß ÇÏ´ÂÁö¿Í
»ç¿ëÇÏÁö ¸»¾Æ¾ß ÇÏ´ÂÁö´Â <a href="#when">À§¿¡¼</a>
¼³¸íÇÏ¿´´Ù.</p>
<p>¾Õ¿¡¼ ¸»ÇßÁö¸¸ ¾ÆÁ÷µµ <code>.htaccess</code> ÆÄÀÏÀÌ
ÇÊ¿äÇÏ´Ù°í »ý°¢µÇ¸é ¾Æ·¡ ¼³Á¤ÀÌ µµ¿òÀÌ µÉ °ÍÀÌ´Ù.</p>
<p><code>.htaccess</code> ÆÄÀÏ ³»¿ë.</p>
<example>
AuthType Basic<br />
AuthName "Password Required"<br />
AuthUserFile /www/passwords/password.file<br />
AuthGroupFile /www/passwords/group.file<br />
Require Group admins
</example>
<p>ÀÌ Áö½Ã¾î°¡ µ¿ÀÛÇϱâÀ§Çؼ´Â
<code>AllowOverride AuthConfig</code> Áö½Ã¾î°¡ ÇÊ¿äÇÔÀ»
¸í½ÉÇ϶ó.</p>
<p>ÀÎÁõ°ú ±ÇÇѺο©¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ ¼³¸íÀº <a href="auth.html">ÀÎÁõ
ÅõÅ丮¾ó</a>À» º¸±æ ¹Ù¶õ´Ù.</p>
</section>
<section id="ssi"><title>Server Side Includes ¿¹Á¦</title>
<p>¶Ç´Ù¸¥ ÀϹÝÀûÀÎ <code>.htaccess</code> ÆÄÀÏÀÇ ¿ëµµ´Â
ƯÁ¤ µð·ºÅ丮¿¡¼ Server Side Includes¸¦ °¡´ÉÇÏ°Ô ¸¸µå´Â
°ÍÀÌ´Ù. ¿øÇÏ´Â µð·ºÅ丮ÀÇ <code>.htaccess</code> ÆÄÀÏ¿¡
´ÙÀ½°ú °°Àº ¼³Á¤ Áö½Ã¾î¸¦ »ç¿ëÇÏ¸é µÈ´Ù.</p>
<example>
Options +Includes<br />
AddType text/html shtml<br />
AddHandler server-parsed shtml
</example>
<p>ÀÌ Áö½Ã¾î°¡ µ¿ÀÛÇÏ·Á¸é <code>AllowOverride Options</code>¿Í
<code>AllowOverride FileInfo</code>°¡ ¸ðµÎ ÇÊ¿äÇÔÀ» ¸í½ÉÇ϶ó.</p>
<p>server-side includes¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ ¼³¸íÀº <a
href="ssi.html">SSI ÅõÅ丮¾ó</a>À» º¸±æ ¹Ù¶õ´Ù.</p>
</section>
<section id="cgi"><title>CGI ¿¹Á¦</title>
<p>¸¶Áö¸·À¸·Î <code>.htaccess</code> ÆÄÀÏÀ» »ç¿ëÇÏ¿© ƯÁ¤
µð·ºÅ丮¿¡¼ CGI ÇÁ·Î±×·¥ ½ÇÇàÀ» Çã¿ëÇÏ°í ½Í´Ù¸é, ´ÙÀ½°ú
°°Àº ¼³Á¤À» »ç¿ëÇÑ´Ù.</p>
<example>
Options +ExecCGI<br />
AddHandler cgi-script cgi pl
</example>
<p>ȤÀº ÀÌ µð·ºÅ丮¿¡ ÀÖ´Â ¸ðµç ÆÄÀÏÀ» CGI ÇÁ·Î±×·¥À¸·Î
ó¸®ÇÏ°í ½Í´Ù¸é ´ÙÀ½°ú °°Àº ¼³Á¤µµ °¡´ÉÇÏ´Ù.</p>
<example>
Options +ExecCGI<br />
SetHandler cgi-script
</example>
<p>ÀÌ Áö½Ã¾î°¡ µ¿ÀÛÇÏ·Á¸é <code>AllowOverride Options</code>¿Í
<code>AllowOverride FileInfo</code>°¡ ¸ðµÎ ÇÊ¿äÇÔÀ» ¸í½ÉÇ϶ó.</p>
<p>CGI ÇÁ·Î±×·¡¹Ö°ú ¼³Á¤¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ ¼³¸íÀº <a
href="cgi.html">CGI ÅõÅ丮¾ó</a>À» º¸±æ ¹Ù¶õ´Ù.</p>
</section>
<section id="troubleshoot"><title>¹®Á¦ÇØ°á</title>
<p><code>.htaccess</code> ÆÄÀÏ¿¡ µÐ ¼³Á¤ Áö½Ã¾î°¡ ¿øÇÏ´Â
±â´ÉÀ» ÇÏÁö ¾Ê´Â °æ¿ì ¿©·¯°¡Áö ÀÌÀ¯°¡ ÀÖÀ» ¼ö ÀÖ´Ù.</p>
<p>°¡Àå ÀϹÝÀûÀÎ ¹®Á¦´Â ¼³Á¤ Áö½Ã¾î¸¦ °¡´ÉÇÏ°Ô ¸¸µå´Â <directive
module="core">AllowOverride</directive>¸¦ ¼³Á¤ÇÏÁö ¾ÊÀº
°æ¿ì´Ù. ¹®Á¦°¡ µÇ´Â ÆÄÀÏ ¿µ¿ª¿¡ <code>AllowOverride None</code>ÀÌ
¾ø´ÂÁö È®ÀÎÇÑ´Ù. <code>.htaccess</code> ÆÄÀÏÀ» ¾Æ¹«·¸°Ô³ª
ÀûÀº ´ÙÀ½ ÆäÀÌÁö¸¦ ´Ù½Ã Á¢±ÙÇÏ¿© ½±°Ô °Ë»çÇغ¼ ¼ö ÀÖ´Ù.
¼¹ö ¿À·ù°¡ ³ª¿ÀÁö ¾ÊÀ¸¸é °ÅÀÇ È®½ÇÈ÷
<code>AllowOverride None</code>À» »ç¿ëÇÑ °æ¿ì´Ù.</p>
<p>¹Ý´ë·Î ¹®¼¿¡ Á¢±ÙÇÒ¶§ ¼¹ö ¿À·ù°¡ ¹ß»ýÇÏ¸é ¾ÆÆÄÄ¡ ¿À·ù·Î±×¸¦
»ìÆìºÁ¶ó. ¾Æ¸¶µµ <code>.htaccess</code> ÆÄÀÏ¿¡ ÀÖ´Â Áö½Ã¾î¸¦
Çã¿ëÇÏÁö ¾Ê´Â´Ù°í ÇÒ °ÍÀÌ´Ù. ¾Æ´Ï°í ¹®¹ý ¿À·ù°¡ ÀÖ´Ù¸é ¿À·ù¸¦
°íÄ£´Ù.</p>
</section>
</manualpage>
|