Mercurial > hg > nginx-site
diff xml/en/docs/http/server_names.xml @ 490:9913f1d51c07
Replaced "nginx" domain names with example domains.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Thu, 19 Apr 2012 12:30:24 +0000 |
parents | 6135f3c95bf6 |
children | be54c443235a |
line wrap: on
line diff
--- a/xml/en/docs/http/server_names.xml Thu Apr 19 09:54:55 2012 +0000 +++ b/xml/en/docs/http/server_names.xml Thu Apr 19 12:30:24 2012 +0000 @@ -20,13 +20,13 @@ <programlisting> server { listen 80; - server_name nginx.org www.nginx.org; + server_name example.org www.example.org; ... } server { listen 80; - server_name *.nginx.org; + server_name *.example.org; ... } @@ -38,7 +38,7 @@ server { listen 80; - server_name ~^(?<user>.+)\.nginx\.net$; + server_name ~^(?<user>.+)\.example\.net$; ... } </programlisting> @@ -52,7 +52,7 @@ </listitem> <listitem> -wildcard names starting with an asterisk: <url>*.nginx.org</url>; +wildcard names starting with an asterisk: <url>*.example.org</url>; </listitem> <listitem> @@ -75,20 +75,20 @@ <para> A wildcard name may contain an asterisk only on the name's start or end, -and only on a dot border. The names “<literal>www.*.nginx.org</literal>” -and “<literal>w*.nginx.org</literal>” are invalid. +and only on a dot border. The names “<literal>www.*.example.org</literal>” +and “<literal>w*.example.org</literal>” are invalid. However, these names can be specified using regular expressions, -for example, “<literal>~^www\..+\.nginx\.org$</literal>” and -“<literal>~^w.*\.nginx\.org$</literal>”. +for example, “<literal>~^www\..+\.example\.org$</literal>” and +“<literal>~^w.*\.example\.org$</literal>”. An asterisk can match several name parts. -The name “<literal>*.nginx.org</literal>” matches not only -<url>www.nginx.org</url> but <url>www.sub.nginx.org</url> as well. +The name “<literal>*.example.org</literal>” matches not only +<url>www.example.org</url> but <url>www.sub.example.org</url> as well. </para> <para> -A special wildcard in the form “<literal>.nginx.org</literal>” can be used -to match both the exact name “<literal>nginx.org</literal>” -and the wildcard name “<literal>*.nginx.org</literal>”. +A special wildcard in the form “<literal>.example.org</literal>” can be used +to match both the exact name “<literal>example.org</literal>” +and the wildcard name “<literal>*.example.org</literal>”. </para> </section> @@ -104,7 +104,7 @@ character: <programlisting> -server_name ~^www\d+\.nginx\.net$; +server_name ~^www\d+\.example\.net$; </programlisting> otherwise it will be treated as an exact name, or if the expression contains @@ -116,7 +116,7 @@ and “}” should be quoted: <programlisting> -server_name "~^(?<name>\w\d<b>{</b>1,3<b>}</b>+)\.nginx\.net$"; +server_name "~^(?<name>\w\d<b>{</b>1,3<b>}</b>+)\.example\.net$"; </programlisting> otherwise nginx will fail to start and display the error message: @@ -196,7 +196,7 @@ <programlisting> server { listen 80; - server_name nginx.org www.nginx.org ""; + server_name example.org www.example.org ""; ... } </programlisting> @@ -221,8 +221,8 @@ <programlisting> server { listen 80; - server_name nginx.org - www.nginx.org + server_name example.org + www.example.org "" <b>192.168.1.1</b> ; @@ -278,14 +278,14 @@ server { listen 80; listen 8080 default_server; - server_name nginx.net; + server_name example.net; ... } server { listen 80 default_server; listen 8080; - server_name nginx.org; + server_name example.org; ... } </programlisting> @@ -312,7 +312,7 @@ ending with an asterisk is searched. Searching wildcard names hashes is slower than searching exact name hash because names are searched by domain parts. -Note that the special wildcard form “<literal>.nginx.org</literal>” +Note that the special wildcard form “<literal>.example.org</literal>” is stored in a wildcard names hash and not in an exact names hash. Regular expressions are tested sequentially and therefore are the slowest method and are non-scalable. @@ -321,13 +321,13 @@ <para> For these reasons, it is better to use exact names where possible. For example, if the most frequently requested names of a server -are <url>nginx.org</url> and <url>www.nginx.org</url>, +are <url>example.org</url> and <url>www.example.org</url>, it is more efficient to define them explicitly: <programlisting> server { listen 80; - server_name nginx.org www.nginx.org *.nginx.org; + server_name example.org www.example.org *.example.org; ... } </programlisting> @@ -337,7 +337,7 @@ <programlisting> server { listen 80; - server_name .nginx.org; + server_name .example.org; ... } </programlisting> @@ -354,7 +354,7 @@ may be equal to 32, or 64, or another value, depending on your CPU cache line size. If the default value is 32 and you define -“too.long.server.name.nginx.org” as a server name, +“too.long.server.name.example.org” as a server name, then nginx will fail to start and display the error message: <programlisting> @@ -433,15 +433,15 @@ </listitem> <listitem> -Wildcard form <url>nginx.*</url> has been supported since 0.6.0. +Wildcard form <url>example.*</url> has been supported since 0.6.0. </listitem> <listitem> -The special form <url>.nginx.org</url> has been supported since 0.3.18. +The special form <url>.example.org</url> has been supported since 0.3.18. </listitem> <listitem> -Wildcard form <url>*.nginx.org</url> has been supported since 0.1.13. +Wildcard form <url>*.example.org</url> has been supported since 0.1.13. </listitem> </list>