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: 151408:1331227 (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_setenvif.xml.meta">
25 <name>mod_setenvif</name>
26 <description>¿äûÀÇ ¼º°Ý¿¡ µû¶ó ȯ°æº¯¼ö ¼³Á¤À» º¯°æÇÑ´Ù</description>
28 <sourcefile>mod_setenvif.c</sourcefile>
29 <identifier>setenvif_module</identifier>
34 <p><module>mod_setenvif</module> ¸ðµâÀº ¿äûÀÇ ¼º°ÝÀÌ
35 Á¤±ÔÇ¥Çö½Ä¿¡ ÇØ´çÇÏ´ÂÁö ¿©ºÎ·Î ȯ°æº¯¼ö¸¦ ¼³Á¤ÇÑ´Ù. ¼¹öÀÇ
36 ´Ù¸¥ ºÎºÐÀÌ ÇൿÀ» °áÁ¤ÇÒ¶§ ÀÌ È¯°æº¯¼ö¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù.</p>
38 <p>¼³Á¤ÆÄÀÏ¿¡ ³ª¿À´Â ¼ø¼´ë·Î Áö½Ã¾î¸¦ ó¸®ÇÑ´Ù. ±×·¡¼
39 ºê¶ó¿ìÀú°¡ MSIE°¡ ¾Æ´Ï¶ó mozillaÀÎ °æ¿ì <code>netscape</code>¸¦
40 ¼³Á¤ÇÏ´Â ¾Æ·¡ ¿¹¿Í °°ÀÌ ¿©·¯ Áö½Ã¾î¸¦ ÇÔ²² »ç¿ëÇÒ ¼ö ÀÖ´Ù.</p>
43 BrowserMatch ^Mozilla netscape<br />
44 BrowserMatch MSIE !netscape<br />
48 <seealso><a href="../env.html">¾ÆÆÄÄ¡ÀÇ È¯°æº¯¼ö</a></seealso>
51 <name>BrowserMatch</name>
52 <description>HTTP User-Agent¿¡ µû¶ó ȯ°æº¯¼ö¸¦ ¼³Á¤ÇÑ´Ù</description>
53 <syntax>BrowserMatch <em>regex [!]env-variable</em>[=<em>value</em>]
54 [[!]<em>env-variable</em>[=<em>value</em>]] ...</syntax>
55 <contextlist><context>server config</context>
56 <context>virtual host</context><context>directory</context>
57 <context>.htaccess</context></contextlist>
58 <override>FileInfo</override>
61 <p><directive>BrowserMatch</directive>´Â <directive
62 module="mod_setenvif">SetEnvIf</directive> Áö½Ã¾îÀÇ Æ¯º°ÇÑ
63 °æ¿ì·Î, HTTP ¿äû Çì´õ <code>User-Agent</code>¿¡ µû¶ó ȯ°æº¯¼ö¸¦
64 ¼³Á¤ÇÑ´Ù. ´ÙÀ½ µÎ ÁÙÀº °°´Ù:</p>
66 BrowserMatchNoCase Robot is_a_robot<br />
67 SetEnvIfNoCase User-Agent Robot is_a_robot<br />
72 BrowserMatch ^Mozilla forms jpeg=yes browser=netscape<br />
73 BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript<br />
74 BrowserMatch MSIE !javascript<br />
80 <name>BrowserMatchNoCase</name>
81 <description>´ë¼Ò¹®ÀÚ¸¦ ±¸º°ÇÏÁö¾Ê°í User-Agent¿¡ µû¶ó ȯ°æº¯¼ö¸¦
82 ¼³Á¤ÇÑ´Ù</description>
83 <syntax>BrowserMatchNoCase <em>regex [!]env-variable</em>[=<em>value</em>]
84 [[!]<em>env-variable</em>[=<em>value</em>]] ...</syntax>
85 <contextlist><context>server config</context>
86 <context>virtual host</context><context>directory</context>
87 <context>.htaccess</context></contextlist>
88 <override>FileInfo</override>
92 <p><directive>BrowserMatchNoCase</directive> Áö½Ã¾î´Â <directive
93 module="mod_setenvif">BrowserMatch</directive> Áö½Ã¾î¿Í
94 ÀÇ¹Ì»ó °°´Ù. ±×·¯³ª ÀÌ Áö½Ã¾î´Â ´ë¼Ò¹®ÀÚ¸¦ ±¸º°ÇÏÁö¾Ê´Â´Ù.
97 BrowserMatchNoCase mac platform=macintosh<br />
98 BrowserMatchNoCase win platform=windows<br />
101 <p><directive>BrowserMatch</directive>¿Í
102 <directive>BrowserMatchNoCase</directive> Áö½Ã¾î´Â
103 <directive module="mod_setenvif">SetEnvIf</directive>¿Í
104 <directive module="mod_setenvif">SetEnvIfNoCase</directive>
105 Áö½Ã¾îÀÇ Æ¯º°ÇÑ °æ¿ì´Ù. ´ÙÀ½ ÁÖ ÁÙÀº °°´Ù:</p>
107 BrowserMatchNoCase Robot is_a_robot<br />
108 SetEnvIfNoCase User-Agent Robot is_a_robot<br />
114 <name>SetEnvIf</name>
115 <description>¿äûÀÇ ¼ºÁú¿¡ µû¶ó ȯ°æº¯¼ö¸¦ ¼³Á¤ÇÑ´Ù</description>
116 <syntax>SetEnvIf <em>attribute
117 regex [!]env-variable</em>[=<em>value</em>]
118 [[!]<em>env-variable</em>[=<em>value</em>]] ...</syntax>
119 <contextlist><context>server config</context>
120 <context>virtual host</context><context>directory</context>
121 <context>.htaccess</context></contextlist>
122 <override>FileInfo</override>
125 <p><directive>SetEnvIf</directive> Áö½Ã¾î´Â ¿äûÀÇ ¼ºÁú¿¡
126 µû¶ó ȯ°æº¯¼ö¸¦ Á¤ÀÇÇÑ´Ù. ù¹ø° ¾Æ±Ô¸ÕÆ® <em>attribute</em>´Â
127 ´ÙÀ½ ¼¼°¡ÁöÁß Çϳª´Ù:</p>
130 <li>HTTP ¿äû Çì´õ (´õ ÀÚ¼¼ÇÑ Á¤º¸´Â <a
131 href="http://www.rfc-editor.org/rfc/rfc2616.txt">RFC2616</a>
132 Âü°í); ¿¹¸¦ µé¾î: <code>Host</code>, <code>User-Agent</code>,
133 <code>Referer</code>, <code>Accept-Language</code>. Á¤±ÔÇ¥Çö½ÄÀ»
134 »ç¿ëÇÏ¿© ¿©·¯ ¿äû Çì´õ¸¦ ÁöĪÇÒ ¼ö ÀÖ´Ù.</li>
136 <li>¿äûÀÇ ´ÙÀ½ ¼ºÁúÁß Çϳª:
138 <li><code>Remote_Host</code> - (ÀÖ´Ù¸é) ¿äûÇϴ Ŭ¶óÀ̾ðÆ®ÀÇ
141 <li><code>Remote_Addr</code> - ¿äûÇϴ Ŭ¶óÀ̾ðÆ®ÀÇ IP ÁÖ¼Ò</li>
143 <li><code>Server_Addr</code> - ¿äûÀ» ¹Þ´Â ¼¹öÀÇ IP ÁÖ¼Ò
144 (2.0.43 ¹öÀü ÀÌÈÄ¿¡¸¸)</li>
146 <li><code>Request_Method</code> - »ç¿ëÇÑ ¸Þ½áµå À̸§
147 (<code>GET</code>, <code>POST</code>, <em>µîµî</em>)</li>
149 <li><code>Request_Protocol</code> - ¿äûÀÇ ÇÁ·ÎÅäÄÝ À̸§°ú
150 ¹öÀü (<em>¿¹¸¦ µé¾î</em>, "HTTP/0.9", "HTTP/1.1", <em>µî.</em>)</li>
152 <li><code>Request_URI</code> - HTTP ¿äû¿¡¼ ¿äûÇÑ ÀÚ¿ø
153 -- ÀϹÝÀûÀ¸·Î URL¿¡¼ ÁúÀǹ®ÀÚ¿À» Á¦¿ÜÇÑ ½ºÅ´(scheme)°ú
154 È£½ºÆ® ÀÌÈÄ ºÎºÐ</li>
158 <li>¿äû°ú ¿¬°üµÈ ȯ°æº¯¼ö À̸§. ±×·¡¼ <directive>SetEnvIf</directive>
159 Áö½Ã¾î´Â ÀÌÀü Áö½Ã¾îÀÇ °á°ú¸¦ °Ë»çÇÒ ¼ö ÀÖ´Ù. ÀÌÀü¿¡
160 <code>SetEnvIf[NoCase]</code> Áö½Ã¾î·Î Á¤ÀÇÇÑ È¯°æº¯¼ö¸¸À»
161 °Ë»çÇÒ ¼ö ÀÖ´Ù. 'ÀÌÀü'À̶õ (¼¹öÀü¿ª°ú °°ÀÌ) ´õ ³ÐÀº ¿µ¿ª ȤÀº
162 Áö½Ã¾îÀÇ ÇöÀç ¿µ¿ª ÀÌÀüÀ» ¶æÇÑ´Ù. ¿äû ¼ºÁúÀÌ ¾Æ´Ï°í Á¤±ÔÇ¥Çö½ÄÀÌ
163 ¾Æ´Ñ <em>attribute</em>´Â ȯ°æº¯¼ö·Î Ãë±ÞÇÑ´Ù.</li>
166 <p>µÎ¹ø° ¾Æ±Ô¸ÕÆ®´Â (<em>regex</em>) <a
167 href="http://www.pcre.org/">Perl ȣȯ Á¤±ÔÇ¥Çö½Ä</a>ÀÌ´Ù.
168 ÀÌ´Â POSIX.2 egrepÀÇ Á¤±ÔÇ¥Çö½Ä°ú ºñ½ÁÇÏ´Ù. <em>regex</em>°¡
169 <em>attribute</em>¿¡ ´ëÀÀÇÏ¸é ³ª¸ÓÁö ¾Æ±Ô¸ÕÆ®¸¦ ó¸®ÇÑ´Ù.</p>
171 <p>³ª¸ÓÁö ¾Æ±Ô¸ÕÆ®´Â ¼³Á¤ÇÒ º¯¼ö¸í°ú (¼±ÅÃÀûÀÎ) ¼³Á¤°ªµéÀÌ´Ù.
172 ´ÙÀ½°ú °°Àº Çü½ÄÀÌ´Ù</p>
175 <li><code><em>varname</em></code>, ȤÀº</li>
177 <li><code>!<em>varname</em></code>, ȤÀº</li>
179 <li><code><em>varname</em>=<em>value</em></code></li>
182 <p>ù¹ø° ÇüÅ´ °ªÀ¸·Î "1"À» »ç¿ëÇÑ´Ù. µÎ¹ø° ÇüÅ´ º¯¼ö°¡
183 ÀÌ¹Ì Á¤ÀÇµÈ °æ¿ì º¯¼ö¸¦ Á¦°ÅÇÏ°í, ¼¼¹ø°´Â º¯¼öÀÇ °ªÀ¸·Î
184 <code><em>value</em></code>¸¦ ¼³Á¤ÇÑ´Ù. ¾ÆÆÄÄ¡ 2.0.51ºÎÅÍ
185 <var>value</var>¿¡ ÀÖ´Â <code>$1</code>..<code>$9</code>¸¦
186 <var>regex</var>ÀÇ °ýȣģ ÇÏÀ§Ç¥Çö½ÄÀ¸·Î ´ëüÇÑ´Ù.</p>
190 SetEnvIf Request_URI "\.gif$" object_is_image=gif<br />
191 SetEnvIf Request_URI "\.jpg$" object_is_image=jpg<br />
192 SetEnvIf Request_URI "\.xbm$" object_is_image=xbm<br />
194 SetEnvIf Referer www\.mydomain\.com intra_site_referral<br />
196 SetEnvIf object_is_image xbm XBIT_PROCESSING=1<br />
198 SetEnvIf ^TS* ^[a-z].* HAVE_TS<br />
201 <p>óÀ½ ¼¼ ÁÙÀº À̹ÌÁö ÆÄÀÏÀ» ¿äûÇÑ °æ¿ì ȯ°æº¯¼ö
202 <code>object_is_image</code>¸¦ ¼³Á¤ÇÑ´Ù. ³×¹ø° ÁÙÀº ÆäÀÌÁö¸¦
203 <code>www.mydomain.com</code> À¥»çÀÌÆ®¿¡¼ ÂüÁ¶ÇÑ °æ¿ì
204 <code>intra_site_referral</code>À» ¼³Á¤ÇÑ´Ù.</p>
206 <p>¸¶Áö¸· ¿¹´Â ¿äû¿¡ À̸§¿¡ "TS"·Î ½ÃÀÛÇÏ°í °ªÀÌ [a-z]
207 Áß Çϳª·Î ½ÃÀÛÇÏ´Â Çì´õ°¡ ÀÖ´Â °æ¿ì ȯ°æº¯¼ö
208 <code>HAVE_TS</code>¸¦ ¼³Á¤ÇÑ´Ù.</p>
211 <seealso><a href="../env.html">¾ÆÆÄÄ¡ÀÇ È¯°æº¯¼ö</a>¿¡ ´õ ¸¹Àº
217 <name>SetEnvIfExpr</name>
218 <description>Sets environment variables based on an ap_expr expression</description>
219 <contextlist><context>server config</context><context>virtual host</context><context>directory</context><context>.htaccess</context></contextlist>
220 <usage><p>Documentation not yet translated. Please see English version of document.</p></usage>
224 <name>SetEnvIfNoCase</name>
225 <description>´ë¼Ò¹®ÀÚ¸¦ ±¸º°ÇÏÁö¾Ê°í ¿äûÀÇ ¼ºÁú¿¡ µû¶ó ȯ°æº¯¼ö¸¦
226 ¼³Á¤ÇÑ´Ù</description>
227 <syntax>SetEnvIfNoCase <em>attribute regex
228 [!]env-variable</em>[=<em>value</em>]
229 [[!]<em>env-variable</em>[=<em>value</em>]] ...</syntax>
230 <contextlist><context>server config</context>
231 <context>virtual host</context><context>directory</context>
232 <context>.htaccess</context></contextlist>
233 <override>FileInfo</override>
237 <p><directive>SetEnvIfNoCase</directive>´Â Àǹ̻ó <directive
238 module="mod_setenvif">SetEnvIf</directive> Áö½Ã¾î¿Í °°Áö¸¸,
239 ´ë¼Ò¹®ÀÚ¸¦ ±¸º°ÇÏÁö¾Ê°í Á¤±ÔÇ¥Çö½ÄÀ» ã´Â´Ù. ¿¹¸¦ µé¾î:</p>
241 SetEnvIfNoCase Host Apache\.Org site=apache
244 <p>ÀÌ °æ¿ì HTTP ¿äû Çì´õ <code>Host:</code>°¡
245 <code>Apache.Org</code>, <code>apache.org</code> µîÀ» Æ÷ÇÔÇϸé
246 <code>site</code> ȯ°æº¯¼ö¸¦ "<code>apache</code>"·Î ¼³Á¤ÇÑ´Ù.</p>