summaryrefslogtreecommitdiff
path: root/docs/manual/custom-error.xml.ko
blob: 331c187467a62b3480ed721874d6f885fb8f2186 (plain)
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
<?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: 420990:1361160 (outdated) -->

<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You 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="custom-error.xml.meta">

  <title>»ç¿ëÀÚÁ¤ÀÇ ¿À·ù ÀÀ´ä</title>

  <summary>
    <p>À¥¸¶½ºÅÍ´Â ¿À·ù³ª ¹®Á¦°¡ ¹ß»ýÇßÀ»¶§ ¾ÆÆÄÄ¡ÀÇ ÀÀ´äÀ»
    ¼³Á¤ÇÒ ¼ö ÀÖ´Ù.</p>

    <p>¼­¹ö°¡ ¿À·ù³ª ¹®Á¦¸¦ ¹ß°ßÇßÀ»¶§ º¸³¾ »ç¿ëÀÚÁ¤ÀÇ ÀÀ´äÀ»
    Á¤ÀÇÇÒ ¼ö ÀÖ´Ù.</p>

    <p>½ºÅ©¸³Æ®°¡ Á×Àº °æ¿ì "500 Server Error" ÀÀ´ä ´ë½Å »ç¿ëÀÚ¿¡°Ô
    ´õ Ä£±ÙÇÑ ¹®±¸¸¦ »ç¿ëÇϰųª ´Ù¸¥ (°°Àº »çÀÌÆ®³ª ¿ÜºÎ »çÀÌÆ®ÀÇ)
    URL·Î ¸®´ÙÀÌ·º¼ÇÀ» ÇÒ ¼ö ÀÖ´Ù.</p>
  </summary>

  <section id="behavior">
    <title>Çൿ</title>

    <section>
      <title>ÀÌÀü Çൿ</title>

      <p>NCSA httpd 1.3Àº »ç¿ëÀÚ¿¡°Ô ¹«ÀǹÌÇÏ°í Áö·çÇÑ ¿À·ù¹®À»
      º¸³Â´Ù. ¹®Á¦°¡ ¹ß»ýÇÑ ÀÌÀ¯¸¦ ·Î±×¿¡ ³²±æ ¼öµµ ¾ø¾ú´Ù.</p>
    </section>

    <section>
      <title>»õ·Î¿î Çൿ</title>

      <p>¼­¹ö´Â ´ÙÀ½°ú °°Àº ÀÏÀ» ÇÒ ¼ö ÀÖ´Ù:</p>

      <ol>
        <li>NCSAÀÇ °íÁ¤µÈ ¹®±¸ ´ë½Å ´Ù¸¥ ¹®±¸¸¦ º¸¿©Áְųª</li>

        <li>°°Àº »çÀÌÆ®ÀÇ URL·Î ¸®´ÙÀÌ·º¼ÇÇϰųª</li>

        <li>¿ÜºÎ »çÀÌÆ®ÀÇ URL·Î ¸®´ÙÀÌ·º¼ÇÇÑ´Ù.</li>
      </ol>

      <p>´Ù¸¥ »çÀÌÆ®ÀÇ URL·Î ¸®´ÙÀÌ·º¼ÇÇÏ´Â °ÍÀÌ À¯¿ëÇÒ ¼ö ÀÖÁö¸¸,
      ÀÌ °æ¿ì ¹®Á¦¸¦ ¼³¸íÇϰųª ·Î±×Çϴµ¥ ÇÊ¿äÇÑ Á¤º¸Áß ÀϺθ¸
      Àü´ÞµÈ´Ù.</p>

      <p>¿À·ù¿¡ ´ëÇÑ Á¤º¸¸¦ Àü´ÞÇϱâÀ§ÇØ ¾ÆÆÄÄ¡´Â CGI½ÄÀÇ »õ·Î¿î
      ȯ°æº¯¼ö¸¦ Á¤ÀÇÇÑ´Ù:</p>

      <example>
        REDIRECT_HTTP_ACCEPT=*/*, image/gif, image/x-xbitmap, 
            image/jpeg<br />
        REDIRECT_HTTP_USER_AGENT=Mozilla/1.1b2 (X11; I; HP-UX A.09.05 
            9000/712)<br />
        REDIRECT_PATH=.:/bin:/usr/local/bin:/etc<br />
        REDIRECT_QUERY_STRING=<br />
        REDIRECT_REMOTE_ADDR=121.345.78.123<br />
        REDIRECT_REMOTE_HOST=ooh.ahhh.com<br />
        REDIRECT_SERVER_NAME=crash.bang.edu<br />
        REDIRECT_SERVER_PORT=80<br />
        REDIRECT_SERVER_SOFTWARE=Apache/0.8.15<br />
        REDIRECT_URL=/cgi-bin/buggy.pl
      </example>

      <p><code>REDIRECT_</code> Á¢µÎ»ç¿¡ ÁÖ¸ñÇ϶ó.</p>

      <p>ÃÖ¼ÒÇÑ <code>REDIRECT_URL</code>°ú
      <code>REDIRECT_QUERY_STRING</code>Àº (cgi-script³ª
      cgi-includeÀÏ) »õ URL·Î ³Ñ°ÜÁø´Ù. ´Ù¸¥ º¯¼ö´Â ¿À·ù°¡
      ¹ß»ýÇϱâ ÀÌÀü¿¡ <transnote>À̸§¿¡¼­ <code>REDIRECT_</code>¸¦
      »« ȯ°æº¯¼ö°¡</transnote> Á¸ÀçÇÑ °æ¿ì¿¡¸¸ ÀÖ´Ù.
      <directive module="core">ErrorDocument</directive>°¡
      <em>¿ÜºÎ·Î</em> (°°Àº ¼­¹ö¶óµµ <code>http:</code>¿Í
      °°Àº ½ºÅ´(scheme)À¸·Î ½ÃÀÛÇÑ´Ù¸é) ¸®´ÙÀÌ·º¼ÇÇÑ´Ù¸é
      ÀÌÁß ¾î¶² °Íµµ ¼³Á¤µÇÁö <strong>¾Ê´Â´Ù</strong>.</p>
    </section>
  </section>

  <section id="configuration">
    <title>¼³Á¤</title>

    <p><directive module="core">AllowOverride</directive>°¡
    ÀûÀýÈ÷ ¼³Á¤µÇ¾ú´Ù¸é .htaccess ÆÄÀÏ¿¡¼­
    <directive module="core">ErrorDocument</directive>¸¦ »ç¿ëÇÒ
    ¼ö ÀÖ´Ù.</p>

    <p>´ÙÀ½Àº ¿¹ÀÌ´Ù...</p>

    <example>
      ErrorDocument 500 /cgi-bin/crash-recover <br />
      ErrorDocument 500 "Sorry, our script crashed. Oh dear" <br />
      ErrorDocument 500 http://xxx/ <br />
      ErrorDocument 404 /Lame_excuses/not_found.html <br />
      ErrorDocument 401 /Subscription/how_to_subscribe.html
    </example>

    <p>¹®¹ýÀº,</p>

    <example>
      ErrorDocument &lt;3-digit-code&gt; &lt;action&gt;
    </example>

    <p>°¡´ÉÇÑ actionÀº,</p>

    <ol>
      <li>Ãâ·ÂÇÒ ¹®±¸. µû¿ÈÇ¥ (")¸¦ ¹®±¸ ¾Õ¿¡ ºÙÀδÙ. µÚ¿¡ ³ª¿À´Â
      µû¿ÈÇ¥´Â Ãâ·ÂµÈ´Ù. <em>ÁÖÀÇ: ¾Õ¿¡ ºÙÀº µû¿ÈÇ¥ (")´Â Ãâ·ÂµÇÁö
      ¾Ê´Â´Ù.</em></li>

      <li>¸®´ÙÀÌ·º¼ÇÇÒ ¿ÜºÎ URL.</li>

      <li>¸®´ÙÀÌ·º¼ÇÇÒ ³»ºÎ URL.</li>
    </ol>
  </section>

  <section id="custom">
    <title>»ç¿ëÀÚÁ¤ÀÇ ¿À·ù ÀÀ´ä°ú ¸®´ÙÀÌ·º¼Ç</title>

    <p>URL·Î ¸®´ÙÀÌ·º¼ÇÇÏ´Â ¾ÆÆÄÄ¡ ÇൿÀº
    ½ºÅ©¸³Æ®/server-include¿¡ ȯ°æº¯¼ö¸¦ ´õ ³Ñ°ÜÁÖµµ·Ï º¯°æµÇ¾ú´Ù.</p>

    <section>
      <title>ÀÌÀü Çൿ</title>

      <p>¸®´ÙÀÌ·º¼ÇµÇ´Â ½ºÅ©¸³Æ®¿¡ Ç¥ÁØ CGI º¯¼öµéÀÌ ³Ñ¾î°£´Ù.
      ¾îµð¿¡¼­ ¸®´ÙÀÌ·º¼ÇÀÌ ÀϾ´ÂÁö ¾Ë ¼ö ¾ø´Ù.</p>
    </section>

    <section>
      <title>»õ·Î¿î Çൿ</title>

      <p>¸®´ÙÀÌ·º¼ÇµÈ ½ºÅ©¸³Æ®´Â »õ·Î¿î ȯ°æº¯¼öµéÀ» »ç¿ëÇÒ
      ¼ö ÀÖ´Ù. ¸ðµÎ ¾Õ¿¡ <code>REDIRECT_</code>°¡ ºÙ¾îÀÖ´Ù.
      <code>REDIRECT_</code> ȯ°æº¯¼ö´Â ¿ø·¡ CGI ȯ°æº¯¼ö¸í
      ¾Õ¿¡ <code>REDIRECT_</code>¸¦ ºÙ¿©¼­ ¸¸µç´Ù. <em>¿¹¸¦
      µé¾î</em>, <code>HTTP_USER_AGENT</code>´Â
      <code>REDIRECT_HTTP_USER_AGENT</code>°¡ µÇ¾ú´Ù. ÀÌ·± º¯¼ö¿¡
      Ãß°¡·Î ½ºÅ©¸³Æ®°¡ ¿ø·¡ URLÀ» ¾Ëµµ·Ï ¾ÆÆÄÄ¡´Â
      <code>REDIRECT_URL</code>°ú <code>REDIRECT_STATUS</code>¸¦
      Á¤ÀÇÇÑ´Ù. ¿ø·¡ URL°ú ¸®´ÙÀÌ·º¼ÇµÈ URL ¸ðµÎ Á¢±Ù ·Î±×¿¡
      ±â·ÏÇÒ ¼ö ÀÖ´Ù.</p>

      <p>ErrorDocument°¡ °°Àº ¼­¹ö¿¡ ÀÖ´Â CGI ½ºÅ©¸³Æ®·Î
      ¸®´ÙÀÌ·º¼ÇÇÑ´Ù¸é, ½ºÅ©¸³Æ®´Â Ŭ¶óÀ̾ðÆ®¿¡°Ô ¿À·ù »óȲÀ»
      È®½ÇÈ÷ Àü´ÞÇϱâÀ§ÇØ Ãâ·Â¿¡ "<code>Status:</code>" Çì´õ
      Çʵ带 Æ÷ÇÔÇØ¾ß ÇÑ´Ù. ¿¹¸¦ µé¾î, Perl·Î ÀÛ¼ºÇÑ ErrorDocument
      ½ºÅ©¸³Æ®´Â ´ÙÀ½°ú °°´Ù:</p>

      <example>
        ... <br />
        print  "Content-type: text/html\n"; <br />
        printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"}; <br />
        ...
      </example>

      <p><code>404&nbsp;Not&nbsp;Found</code>¿Í °°Àº ƯÁ¤ ¿À·ù
      »óȲ¿¡ ´ëÇÑ ½ºÅ©¸³Æ®¶ó¸é, ´ë½Å <transnote>°íÁ¤µÈ</transnote>
      ƯÁ¤ »óÅÂÄÚµå¿Í ¿À·ù¹®À» »ç¿ëÇÒ ¼ö ÀÖ´Ù.</p>

      <p>(Ŭ¶óÀ̾ðÆ®¿¡°Ô ¸®´ÙÀÌ·º¼ÇÀ» ¿äûÇϱâÀ§ÇØ) ÀÀ´ä¿¡
      <code>Location:</code> Çì´õ¸¦ Æ÷ÇÔÇÑ´Ù¸é, ½ºÅ©¸³Æ®´Â
      <em>¹Ýµå½Ã</em> (<code>302&nbsp;Found</code> °°Àº) ÀûÀýÇÑ
      <code>Status:</code> Çì´õ¸¦ Ãâ·ÂÇØ¾ß ÇÔÀ» ÁÖÀÇÇ϶ó. ±×·¸Áö¾ÊÀ¸¸é
      <code>Location:</code> Çì´õ°¡ ¾Æ¹« ¼Ò¿ë¾ø°Ô µÉ ¼ö ÀÖ´Ù.</p>
    </section>
  </section>
</manualpage>