Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_core_module.xml @ 67:d98323a15ba4
Documented the nested locations.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Sun, 09 Oct 2011 16:56:56 +0000 |
parents | 9332d7a02822 |
children | 9de85defbcf8 |
comparison
equal
deleted
inserted
replaced
66:9332d7a02822 | 67:d98323a15ba4 |
---|---|
994 ] <argument>uri</argument> | 994 ] <argument>uri</argument> |
995 { ... }</syntax> | 995 { ... }</syntax> |
996 <syntax>location <value>@</value><argument>name</argument> { ... }</syntax> | 996 <syntax>location <value>@</value><argument>name</argument> { ... }</syntax> |
997 <default/> | 997 <default/> |
998 <context>server</context> | 998 <context>server</context> |
999 <!-- | 999 <context>location</context> |
1000 <context>location</context> | |
1001 --> | |
1002 | 1000 |
1003 <para> | 1001 <para> |
1004 Sets a configuration based on a request URI. | 1002 Sets a configuration based on a request URI. |
1005 A location can either be defined by a prefix string, or by a regular expression. | 1003 A location can either be defined by a prefix string, or by a regular expression. |
1006 Regular expressions are specified by prepending them with the | 1004 Regular expressions are specified by prepending them with the |
1016 If no match with a regular expression location is found then a | 1014 If no match with a regular expression location is found then a |
1017 configuration of the most specific prefix location is used. | 1015 configuration of the most specific prefix location is used. |
1018 </para> | 1016 </para> |
1019 | 1017 |
1020 <para> | 1018 <para> |
1019 Locations can be nested, with some exceptions mentioned below. | |
1020 </para> | |
1021 | |
1022 <para> | |
1021 For case-insensitive operating systems such as Mac OS X and Cygwin, | 1023 For case-insensitive operating systems such as Mac OS X and Cygwin, |
1022 the string matching ignores a case (0.7.7). | 1024 the string matching ignores a case (0.7.7). |
1023 However, comparison is limited to one-byte locales. | 1025 However, comparison is limited to one-byte locales. |
1024 </para> | 1026 </para> |
1025 | 1027 |
1039 If an exact match is found, the search terminates. | 1041 If an exact match is found, the search terminates. |
1040 For example, if a <dq><code>/</code></dq> request happens frequently, | 1042 For example, if a <dq><code>/</code></dq> request happens frequently, |
1041 defining <dq><code>location = /</code></dq> will speed up the processing | 1043 defining <dq><code>location = /</code></dq> will speed up the processing |
1042 of these requests, as search terminates right after the first | 1044 of these requests, as search terminates right after the first |
1043 comparison. | 1045 comparison. |
1044 </para> | 1046 Such a location cannot obviously contain nested locations. |
1045 | 1047 </para> |
1046 <para> | 1048 |
1049 <para> | |
1050 <note> | |
1047 In versions from 0.7.1 to 0.8.41, if a request matched the prefix | 1051 In versions from 0.7.1 to 0.8.41, if a request matched the prefix |
1048 location without the <dq><value>=</value></dq> and <dq><value>^~</value></dq> | 1052 location without the <dq><value>=</value></dq> and <dq><value>^~</value></dq> |
1049 prefixes, the search also terminated and regular expressions were | 1053 prefixes, the search also terminated and regular expressions were |
1050 not checked. | 1054 not checked. |
1055 </note> | |
1051 </para> | 1056 </para> |
1052 | 1057 |
1053 <para> | 1058 <para> |
1054 Let's illustrate the above by example: | 1059 Let's illustrate the above by example: |
1055 <example> | 1060 <example> |
1078 | 1083 |
1079 <para> | 1084 <para> |
1080 The <dq><value>@</value></dq> prefix defines a named location. | 1085 The <dq><value>@</value></dq> prefix defines a named location. |
1081 Such a location is not used for a regular request processing, but instead | 1086 Such a location is not used for a regular request processing, but instead |
1082 used for request redirection. | 1087 used for request redirection. |
1088 They cannot be nested, and cannot contain nested locations. | |
1083 </para> | 1089 </para> |
1084 | 1090 |
1085 <!-- | 1091 <!-- |
1086 <migration from="Apache" directive="Location" /> | 1092 <migration from="Apache" directive="Location" /> |
1087 --> | 1093 --> |