| <?xml version="1.0" encoding="EUC-KR" ?> |
| <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd"> |
| <?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?> |
| <!-- English Revision: 151408:1727648 (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. |
| --> |
| |
| <modulesynopsis metafile="mod_setenvif.xml.meta"> |
| |
| <name>mod_setenvif</name> |
| <description>¿äûÀÇ ¼º°Ý¿¡ µû¶ó ȯ°æº¯¼ö ¼³Á¤À» º¯°æÇÑ´Ù</description> |
| <status>Base</status> |
| <sourcefile>mod_setenvif.c</sourcefile> |
| <identifier>setenvif_module</identifier> |
| |
| |
| <summary> |
| |
| <p><module>mod_setenvif</module> ¸ðµâÀº ¿äûÀÇ ¼º°ÝÀÌ |
| Á¤±ÔÇ¥Çö½Ä¿¡ ÇØ´çÇÏ´ÂÁö ¿©ºÎ·Î ȯ°æº¯¼ö¸¦ ¼³Á¤ÇÑ´Ù. ¼¹öÀÇ |
| ´Ù¸¥ ºÎºÐÀÌ ÇൿÀ» °áÁ¤ÇÒ¶§ ÀÌ È¯°æº¯¼ö¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù.</p> |
| |
| <p>¼³Á¤ÆÄÀÏ¿¡ ³ª¿À´Â ¼ø¼´ë·Î Áö½Ã¾î¸¦ ó¸®ÇÑ´Ù. ±×·¡¼ |
| ºê¶ó¿ìÀú°¡ MSIE°¡ ¾Æ´Ï¶ó mozillaÀÎ °æ¿ì <code>netscape</code>¸¦ |
| ¼³Á¤ÇÏ´Â ¾Æ·¡ ¿¹¿Í °°ÀÌ ¿©·¯ Áö½Ã¾î¸¦ ÇÔ²² »ç¿ëÇÒ ¼ö ÀÖ´Ù.</p> |
| |
| <example> |
| BrowserMatch ^Mozilla netscape<br /> |
| BrowserMatch MSIE !netscape<br /> |
| </example> |
| </summary> |
| |
| <seealso><a href="../env.html">¾ÆÆÄÄ¡ÀÇ È¯°æº¯¼ö</a></seealso> |
| |
| <directivesynopsis> |
| <name>BrowserMatch</name> |
| <description>HTTP User-Agent¿¡ µû¶ó ȯ°æº¯¼ö¸¦ ¼³Á¤ÇÑ´Ù</description> |
| <syntax>BrowserMatch <em>regex [!]env-variable</em>[=<em>value</em>] |
| [[!]<em>env-variable</em>[=<em>value</em>]] ...</syntax> |
| <contextlist><context>server config</context> |
| <context>virtual host</context><context>directory</context> |
| <context>.htaccess</context></contextlist> |
| <override>FileInfo</override> |
| |
| <usage> |
| <p><directive>BrowserMatch</directive>´Â <directive |
| module="mod_setenvif">SetEnvIf</directive> Áö½Ã¾îÀÇ Æ¯º°ÇÑ |
| °æ¿ì·Î, HTTP ¿äû Çì´õ <code>User-Agent</code>¿¡ µû¶ó ȯ°æº¯¼ö¸¦ |
| ¼³Á¤ÇÑ´Ù. ´ÙÀ½ µÎ ÁÙÀº °°´Ù:</p> |
| <example> |
| BrowserMatchNoCase Robot is_a_robot<br /> |
| SetEnvIfNoCase User-Agent Robot is_a_robot<br /> |
| </example> |
| |
| <p>Ãß°¡ ¿¹Á¦:</p> |
| <example> |
| BrowserMatch ^Mozilla forms jpeg=yes browser=netscape<br /> |
| BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript<br /> |
| BrowserMatch MSIE !javascript<br /> |
| </example> |
| </usage> |
| </directivesynopsis> |
| |
| <directivesynopsis> |
| <name>BrowserMatchNoCase</name> |
| <description>´ë¼Ò¹®ÀÚ¸¦ ±¸º°ÇÏÁö¾Ê°í User-Agent¿¡ µû¶ó ȯ°æº¯¼ö¸¦ |
| ¼³Á¤ÇÑ´Ù</description> |
| <syntax>BrowserMatchNoCase <em>regex [!]env-variable</em>[=<em>value</em>] |
| [[!]<em>env-variable</em>[=<em>value</em>]] ...</syntax> |
| <contextlist><context>server config</context> |
| <context>virtual host</context><context>directory</context> |
| <context>.htaccess</context></contextlist> |
| <override>FileInfo</override> |
| |
| <usage> |
| |
| <p><directive>BrowserMatchNoCase</directive> Áö½Ã¾î´Â <directive |
| module="mod_setenvif">BrowserMatch</directive> Áö½Ã¾î¿Í |
| ÀÇ¹Ì»ó °°´Ù. ±×·¯³ª ÀÌ Áö½Ã¾î´Â ´ë¼Ò¹®ÀÚ¸¦ ±¸º°ÇÏÁö¾Ê´Â´Ù. |
| ¿¹¸¦ µé¾î:</p> |
| <example> |
| BrowserMatchNoCase mac platform=macintosh<br /> |
| BrowserMatchNoCase win platform=windows<br /> |
| </example> |
| |
| <p><directive>BrowserMatch</directive>¿Í |
| <directive>BrowserMatchNoCase</directive> Áö½Ã¾î´Â |
| <directive module="mod_setenvif">SetEnvIf</directive>¿Í |
| <directive module="mod_setenvif">SetEnvIfNoCase</directive> |
| Áö½Ã¾îÀÇ Æ¯º°ÇÑ °æ¿ì´Ù. ´ÙÀ½ ÁÖ ÁÙÀº °°´Ù:</p> |
| <example> |
| BrowserMatchNoCase Robot is_a_robot<br /> |
| SetEnvIfNoCase User-Agent Robot is_a_robot<br /> |
| </example> |
| </usage> |
| </directivesynopsis> |
| |
| <directivesynopsis> |
| <name>SetEnvIf</name> |
| <description>¿äûÀÇ ¼ºÁú¿¡ µû¶ó ȯ°æº¯¼ö¸¦ ¼³Á¤ÇÑ´Ù</description> |
| <syntax>SetEnvIf <em>attribute |
| regex [!]env-variable</em>[=<em>value</em>] |
| [[!]<em>env-variable</em>[=<em>value</em>]] ...</syntax> |
| <contextlist><context>server config</context> |
| <context>virtual host</context><context>directory</context> |
| <context>.htaccess</context></contextlist> |
| <override>FileInfo</override> |
| |
| <usage> |
| <p><directive>SetEnvIf</directive> Áö½Ã¾î´Â ¿äûÀÇ ¼ºÁú¿¡ |
| µû¶ó ȯ°æº¯¼ö¸¦ Á¤ÀÇÇÑ´Ù. ù¹ø° ¾Æ±Ô¸ÕÆ® <em>attribute</em>´Â |
| ´ÙÀ½ ¼¼°¡ÁöÁß Çϳª´Ù:</p> |
| |
| <ol> |
| <li>HTTP ¿äû Çì´õ (´õ ÀÚ¼¼ÇÑ Á¤º¸´Â <a |
| href="http://www.rfc-editor.org/rfc/rfc2616.txt">RFC2616</a> |
| Âü°í); ¿¹¸¦ µé¾î: <code>Host</code>, <code>User-Agent</code>, |
| <code>Referer</code>, <code>Accept-Language</code>. Á¤±ÔÇ¥Çö½ÄÀ» |
| »ç¿ëÇÏ¿© ¿©·¯ ¿äû Çì´õ¸¦ ÁöĪÇÒ ¼ö ÀÖ´Ù.</li> |
| |
| <li>¿äûÀÇ ´ÙÀ½ ¼ºÁúÁß Çϳª: |
| <ul> |
| <li><code>Remote_Host</code> - (ÀÖ´Ù¸é) ¿äûÇϴ Ŭ¶óÀ̾ðÆ®ÀÇ |
| È£½ºÆ®¸í</li> |
| |
| <li><code>Remote_Addr</code> - ¿äûÇϴ Ŭ¶óÀ̾ðÆ®ÀÇ IP ÁÖ¼Ò</li> |
| |
| <li><code>Server_Addr</code> - ¿äûÀ» ¹Þ´Â ¼¹öÀÇ IP ÁÖ¼Ò |
| (2.0.43 ¹öÀü ÀÌÈÄ¿¡¸¸)</li> |
| |
| <li><code>Request_Method</code> - »ç¿ëÇÑ ¸Þ½áµå À̸§ |
| (<code>GET</code>, <code>POST</code>, <em>µîµî</em>)</li> |
| |
| <li><code>Request_Protocol</code> - ¿äûÀÇ ÇÁ·ÎÅäÄÝ À̸§°ú |
| ¹öÀü (<em>¿¹¸¦ µé¾î</em>, "HTTP/0.9", "HTTP/1.1", <em>µî.</em>)</li> |
| |
| <li><code>Request_URI</code> - HTTP ¿äû¿¡¼ ¿äûÇÑ ÀÚ¿ø |
| -- ÀϹÝÀûÀ¸·Î URL¿¡¼ ÁúÀǹ®ÀÚ¿À» Á¦¿ÜÇÑ ½ºÅ´(scheme)°ú |
| È£½ºÆ® ÀÌÈÄ ºÎºÐ</li> |
| </ul> |
| </li> |
| |
| <li>¿äû°ú ¿¬°üµÈ ȯ°æº¯¼ö À̸§. ±×·¡¼ <directive>SetEnvIf</directive> |
| Áö½Ã¾î´Â ÀÌÀü Áö½Ã¾îÀÇ °á°ú¸¦ °Ë»çÇÒ ¼ö ÀÖ´Ù. ÀÌÀü¿¡ |
| <code>SetEnvIf[NoCase]</code> Áö½Ã¾î·Î Á¤ÀÇÇÑ È¯°æº¯¼ö¸¸À» |
| °Ë»çÇÒ ¼ö ÀÖ´Ù. 'ÀÌÀü'À̶õ (¼¹öÀü¿ª°ú °°ÀÌ) ´õ ³ÐÀº ¿µ¿ª ȤÀº |
| Áö½Ã¾îÀÇ ÇöÀç ¿µ¿ª ÀÌÀüÀ» ¶æÇÑ´Ù. ¿äû ¼ºÁúÀÌ ¾Æ´Ï°í Á¤±ÔÇ¥Çö½ÄÀÌ |
| ¾Æ´Ñ <em>attribute</em>´Â ȯ°æº¯¼ö·Î Ãë±ÞÇÑ´Ù.</li> |
| </ol> |
| |
| <p>µÎ¹ø° ¾Æ±Ô¸ÕÆ®´Â (<em>regex</em>) <a |
| href="http://www.pcre.org/">Perl ȣȯ Á¤±ÔÇ¥Çö½Ä</a>ÀÌ´Ù. |
| ÀÌ´Â POSIX.2 egrepÀÇ Á¤±ÔÇ¥Çö½Ä°ú ºñ½ÁÇÏ´Ù. <em>regex</em>°¡ |
| <em>attribute</em>¿¡ ´ëÀÀÇÏ¸é ³ª¸ÓÁö ¾Æ±Ô¸ÕÆ®¸¦ ó¸®ÇÑ´Ù.</p> |
| |
| <p>³ª¸ÓÁö ¾Æ±Ô¸ÕÆ®´Â ¼³Á¤ÇÒ º¯¼ö¸í°ú (¼±ÅÃÀûÀÎ) ¼³Á¤°ªµéÀÌ´Ù. |
| ´ÙÀ½°ú °°Àº Çü½ÄÀÌ´Ù</p> |
| |
| <ol> |
| <li><code><em>varname</em></code>, ȤÀº</li> |
| |
| <li><code>!<em>varname</em></code>, ȤÀº</li> |
| |
| <li><code><em>varname</em>=<em>value</em></code></li> |
| </ol> |
| |
| <p>ù¹ø° ÇüÅ´ °ªÀ¸·Î "1"À» »ç¿ëÇÑ´Ù. µÎ¹ø° ÇüÅ´ º¯¼ö°¡ |
| ÀÌ¹Ì Á¤ÀÇµÈ °æ¿ì º¯¼ö¸¦ Á¦°ÅÇÏ°í, ¼¼¹ø°´Â º¯¼öÀÇ °ªÀ¸·Î |
| <code><em>value</em></code>¸¦ ¼³Á¤ÇÑ´Ù. ¾ÆÆÄÄ¡ 2.0.51ºÎÅÍ |
| <var>value</var>¿¡ ÀÖ´Â <code>$1</code>..<code>$9</code>¸¦ |
| <var>regex</var>ÀÇ °ýȣģ ÇÏÀ§Ç¥Çö½ÄÀ¸·Î ´ëüÇÑ´Ù.</p> |
| |
| <example> |
| <title>¿¹Á¦:</title> |
| SetEnvIf Request_URI "\.gif$" object_is_image=gif<br /> |
| SetEnvIf Request_URI "\.jpg$" object_is_image=jpg<br /> |
| SetEnvIf Request_URI "\.xbm$" object_is_image=xbm<br /> |
| :<br /> |
| SetEnvIf Referer www\.mydomain\.com intra_site_referral<br /> |
| :<br /> |
| SetEnvIf object_is_image xbm XBIT_PROCESSING=1<br /> |
| :<br /> |
| SetEnvIf ^TS* ^[a-z].* HAVE_TS<br /> |
| </example> |
| |
| <p>óÀ½ ¼¼ ÁÙÀº À̹ÌÁö ÆÄÀÏÀ» ¿äûÇÑ °æ¿ì ȯ°æº¯¼ö |
| <code>object_is_image</code>¸¦ ¼³Á¤ÇÑ´Ù. ³×¹ø° ÁÙÀº ÆäÀÌÁö¸¦ |
| <code>www.mydomain.com</code> À¥»çÀÌÆ®¿¡¼ ÂüÁ¶ÇÑ °æ¿ì |
| <code>intra_site_referral</code>À» ¼³Á¤ÇÑ´Ù.</p> |
| |
| <p>¸¶Áö¸· ¿¹´Â ¿äû¿¡ À̸§¿¡ "TS"·Î ½ÃÀÛÇÏ°í °ªÀÌ [a-z] |
| Áß Çϳª·Î ½ÃÀÛÇÏ´Â Çì´õ°¡ ÀÖ´Â °æ¿ì ȯ°æº¯¼ö |
| <code>HAVE_TS</code>¸¦ ¼³Á¤ÇÑ´Ù.</p> |
| </usage> |
| |
| <seealso><a href="../env.html">¾ÆÆÄÄ¡ÀÇ È¯°æº¯¼ö</a>¿¡ ´õ ¸¹Àº |
| ¿¹Á¦°¡ ÀÖ´Ù. |
| </seealso> |
| </directivesynopsis> |
| |
| <directivesynopsis> |
| <name>SetEnvIfExpr</name> |
| <description>Sets environment variables based on an ap_expr expression</description> |
| <contextlist><context>server config</context><context>virtual host</context><context>directory</context><context>.htaccess</context></contextlist> |
| <usage><p>Documentation not yet translated. Please see English version of document.</p></usage> |
| </directivesynopsis> |
| |
| <directivesynopsis> |
| <name>SetEnvIfNoCase</name> |
| <description>´ë¼Ò¹®ÀÚ¸¦ ±¸º°ÇÏÁö¾Ê°í ¿äûÀÇ ¼ºÁú¿¡ µû¶ó ȯ°æº¯¼ö¸¦ |
| ¼³Á¤ÇÑ´Ù</description> |
| <syntax>SetEnvIfNoCase <em>attribute regex |
| [!]env-variable</em>[=<em>value</em>] |
| [[!]<em>env-variable</em>[=<em>value</em>]] ...</syntax> |
| <contextlist><context>server config</context> |
| <context>virtual host</context><context>directory</context> |
| <context>.htaccess</context></contextlist> |
| <override>FileInfo</override> |
| |
| <usage> |
| |
| <p><directive>SetEnvIfNoCase</directive>´Â Àǹ̻ó <directive |
| module="mod_setenvif">SetEnvIf</directive> Áö½Ã¾î¿Í °°Áö¸¸, |
| ´ë¼Ò¹®ÀÚ¸¦ ±¸º°ÇÏÁö¾Ê°í Á¤±ÔÇ¥Çö½ÄÀ» ã´Â´Ù. ¿¹¸¦ µé¾î:</p> |
| <example> |
| SetEnvIfNoCase Host Apache\.Org site=apache |
| </example> |
| |
| <p>ÀÌ °æ¿ì HTTP ¿äû Çì´õ <code>Host:</code>°¡ |
| <code>Apache.Org</code>, <code>apache.org</code> µîÀ» Æ÷ÇÔÇϸé |
| <code>site</code> ȯ°æº¯¼ö¸¦ "<code>apache</code>"·Î ¼³Á¤ÇÑ´Ù.</p> |
| </usage> |
| </directivesynopsis> |
| </modulesynopsis> |