Mercurial > hg > nginx-site
changeset 628:779a47d0acb0
Unified terminology used in the "server_name" directive and server_names.xml.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Mon, 13 Aug 2012 08:22:19 +0000 |
parents | af23cb587b00 |
children | 7e4805858796 |
files | xml/en/docs/http/ngx_http_core_module.xml |
diffstat | 1 files changed, 19 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_core_module.xml +++ b/xml/en/docs/http/ngx_http_core_module.xml @@ -10,7 +10,7 @@ <module name="Module ngx_http_core_module" link="/en/docs/http/ngx_http_core_module.html" lang="en" - rev="1"> + rev="2"> <section id="directives" name="Directives"> @@ -2115,6 +2115,9 @@ server { <para> The first name becomes the primary server name. +</para> + +<para> Server names can include an asterisk (“<literal>*</literal>”) to replace the first or last part of a name: <example> @@ -2122,6 +2125,7 @@ server { server_name example.com *.example.com www.example.*; } </example> +Such names are called wildcard names. </para> <para> @@ -2134,11 +2138,6 @@ server { </para> <para> -If the parameter equals “<var>$hostname</var>” (0.9.4), the -machine’s hostname is substituted. -</para> - -<para> It is also possible to use regular expressions in server names, prepending the name with a tilde (“<literal>~</literal>”): <example> @@ -2193,6 +2192,11 @@ server { </para> <para> +If the parameter equals “<var>$hostname</var>” (0.9.4), the +machine’s hostname is substituted. +</para> + +<para> It is also possible to specify an empty server name (0.7.11): <example> server { @@ -2210,21 +2214,21 @@ Before 0.8.48, the machine’s hostname was used by default. <para> When searching for a virtual server by name, if name matches more than one of the specified variants, -e.g. both mask and regular expression match, the first matching +e.g. both wildcard name and regular expression match, the first matching variant will be chosen, in the following order of precedence: <list type="enum"> <listitem> -full name +exact name </listitem> <listitem> -longest name with a prefix mask, +longest wildcard name starting with an asterisk, e.g. “<literal>*.example.com</literal>” </listitem> <listitem> -longest name with a suffix mask, +longest wildcard name ending with an asterisk, e.g. “<literal>mail.*</literal>” </listitem> @@ -2236,6 +2240,11 @@ first matching regular expression </list> </para> +<para> +For more information, please refer to the +<link doc="server_names.xml"/> document. +</para> + </directive>