changeset 1680:57c3f36b3b6a

Updated docs for the upcoming NGINX Plus release.
author Ruslan Ermilov <ru@nginx.com>
date Sun, 10 Apr 2016 00:12:49 +0300
parents e9ad1cae4401
children 3a9097dc9d86
files xml/en/docs/http/ngx_http_core_module.xml xml/en/docs/http/ngx_http_upstream_conf_module.xml xml/en/docs/http/ngx_http_upstream_module.xml xml/en/docs/stream/ngx_stream_upstream_module.xml xml/ru/docs/http/ngx_http_core_module.xml xml/ru/docs/http/ngx_http_upstream_conf_module.xml xml/ru/docs/http/ngx_http_upstream_module.xml
diffstat 7 files changed, 189 insertions(+), 20 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="53">
+        rev="54">
 
 <section id="directives" name="Directives">
 
@@ -2488,7 +2488,10 @@ The details of setting up hash tables ar
 
 
 <directive name="server_tokens">
-<syntax><literal>on</literal> | <literal>off</literal></syntax>
+<syntax>
+    <literal>on</literal> |
+    <literal>off</literal> |
+    <value>string</value></syntax>
 <default>on</default>
 <context>http</context>
 <context>server</context>
@@ -2499,6 +2502,16 @@ Enables or disables emitting nginx versi
 <header>Server</header> response header field.
 </para>
 
+<para>
+Additionally, as part of our
+<commercial_version>commercial subscription</commercial_version>,
+starting from version 1.9.13
+the signature in error messages and
+the <header>Server</header> response header field value
+can be set explicitly using the <value>string</value> with variables.
+An empty string disables the emission of the <header>Server</header> field.
+</para>
+
 </directive>
 
 
--- a/xml/en/docs/http/ngx_http_upstream_conf_module.xml
+++ b/xml/en/docs/http/ngx_http_upstream_conf_module.xml
@@ -9,7 +9,7 @@
 <module name="Module ngx_http_upstream_conf_module"
         link="/en/docs/http/ngx_http_upstream_conf_module.html"
         lang="en"
-        rev="2">
+        rev="3">
 
 <section id="summary">
 
@@ -175,6 +175,17 @@ upstream server.
 </tag-desc>
 
 <tag-name>
+<literal>service=</literal><value>name</value></tag-name>
+<tag-desc>
+Same as the “<literal>service</literal>” parameter
+of the
+<link doc="ngx_http_upstream_module.xml" id="service">http</link>
+or
+<link doc="../stream/ngx_stream_upstream_module.xml" id="service">stream</link>
+upstream server (1.9.13).
+</tag-desc>
+
+<tag-name>
 <literal>weight=</literal><value>number</value></tag-name>
 <tag-desc>
 Same as the “<literal>weight</literal>” parameter
--- a/xml/en/docs/http/ngx_http_upstream_module.xml
+++ b/xml/en/docs/http/ngx_http_upstream_module.xml
@@ -10,7 +10,7 @@
 <module name="Module ngx_http_upstream_module"
         link="/en/docs/http/ngx_http_upstream_module.html"
         lang="en"
-        rev="46">
+        rev="47">
 
 <section id="summary">
 
@@ -62,6 +62,7 @@ upstream <emphasis>dynamic</emphasis> {
     server backend2.example.com:8080 fail_timeout=5s slow_start=30s;
     server 192.0.2.1                 max_fails=3;
     server backend3.example.com      resolve;
+    server backend4.example.com      service=http resolve;
 
     server backup1.example.com:8080  backup;
     server backup2.example.com:8080  backup;
@@ -264,6 +265,40 @@ http {
 sets the server route name.
 </tag-desc>
 
+<tag-name id="service">
+<literal>service</literal>=<value>name</value> | <value>_name._protocol</value>
+</tag-name>
+<tag-desc>
+enables resolving of DNS
+<link url="https://tools.ietf.org/html/rfc2782">SRV</link>
+records and sets the service <value>name</value>,
+or <value>name</value> and <value>protocol</value> in the following format:
+<value>_name._protocol</value> (1.9.13).
+If only the <value>name</value> is specified,
+the <literal>TCP</literal> protocol is used.
+<para>
+In order for this parameter to work, it is necessary to specify
+the <link id="resolve"/> parameter for the server
+and specify a hostname without a port number:
+<example>
+server backend.example.com service=http resolve;
+server backend.example.com service=_http._tcp resolve;
+</example>
+Both directives specify the same SRV record:
+<literal>_http._tcp.backend.example.com</literal>.
+</para>
+
+<para>
+Highest-priority SRV records
+(records with the same lowest-number priority value)
+are resolved as primary servers,
+the rest of SRV records are resolved as backup servers.
+If the <link id="backup"/> parameter is specified for the server,
+high-priority SRV records are resolved as backup servers,
+the rest of SRV records are ignored.
+</para>
+</tag-desc>
+
 <tag-name id="slow_start">
 <literal>slow_start</literal>=<value>time</value>
 </tag-name>
--- a/xml/en/docs/stream/ngx_stream_upstream_module.xml
+++ b/xml/en/docs/stream/ngx_stream_upstream_module.xml
@@ -9,7 +9,7 @@
 <module name="Module ngx_stream_upstream_module"
         link="/en/docs/stream/ngx_stream_upstream_module.html"
         lang="en"
-        rev="10">
+        rev="11">
 
 <section id="summary">
 
@@ -59,6 +59,7 @@ upstream <emphasis>dynamic</emphasis> {
     server backend2.example.com:12345 fail_timeout=5s slow_start=30s;
     server 192.0.2.1:12345            max_fails=3;
     server backend3.example.com:12345 resolve;
+    server backend4.example.com       service=http resolve;
 
     server backup1.example.com:12345  backup;
     server backup2.example.com:12345  backup;
@@ -241,6 +242,40 @@ stream {
 </para>
 </tag-desc>
 
+<tag-name id="service">
+<literal>service</literal>=<value>name</value> | <value>_name._protocol</value>
+</tag-name>
+<tag-desc>
+enables resolving of DNS
+<link url="https://tools.ietf.org/html/rfc2782">SRV</link>
+records and sets the service <value>name</value>,
+or <value>name</value> and <value>protocol</value> in the following format:
+<value>_name._protocol</value> (1.9.13).
+If only the <value>name</value> is specified,
+the <literal>TCP</literal> protocol is used.
+<para>
+In order for this parameter to work, it is necessary to specify
+the <link id="resolve"/> parameter for the server
+and specify a hostname without a port number:
+<example>
+server backend.example.com service=http resolve;
+server backend.example.com service=_http._tcp resolve;
+</example>
+Both directives specify the same SRV record:
+<literal>_http._tcp.backend.example.com</literal>.
+</para>
+
+<para>
+Highest-priority SRV records
+(records with the same lowest-number priority value)
+are resolved as primary servers,
+the rest of SRV records are resolved as backup servers.
+If the <link id="backup"/> parameter is specified for the server,
+high-priority SRV records are resolved as backup servers,
+the rest of SRV records are ignored.
+</para>
+</tag-desc>
+
 <tag-name id="slow_start">
 <literal>slow_start</literal>=<value>time</value>
 </tag-name>
@@ -459,8 +494,9 @@ by default, 1;
 </tag-name>
 <tag-desc>
 specifies the <literal>match</literal> block configuring the tests that a
-successful connection should pass in order for a health check to pass;
-by default, only the ability to connect to the server is checked;
+successful connection should pass in order for a health check to pass.
+By default,
+only the ability to establish a TCP connection with the server is checked;
 </tag-desc>
 
 <tag-name id="health_check_port">
@@ -469,7 +505,18 @@ by default, only the ability to connect 
 <tag-desc>
 defines the port used when connecting to a server
 to perform a health check (1.9.7);
-by default, equals the <link id="server"/> port.
+by default, equals the <link id="server"/> port;
+</tag-desc>
+
+<tag-name id="health_check_udp">
+<literal>udp</literal>
+</tag-name>
+<tag-desc>
+specifies that the <literal>UDP</literal> protocol should be used for
+health checks instead of the default <literal>TCP</literal> protocol (1.9.13);
+requires a <link id="hc_match">match</link> block with the
+<link id="match_send">send</link> and <link id="match_expect">expect</link>
+parameters.
 </tag-desc>
 
 </list>
@@ -483,8 +530,8 @@ server {
     health_check;
 }
 </example>
-will check the ability to connect to each
-server in the <literal>backend</literal> group every five seconds.
+will check the ability to establish a TCP connection to each server
+in the <literal>backend</literal> group every five seconds.
 When a connection to the server cannot be established,
 the health check will fail, and the server will
 be considered unhealthy.
@@ -552,31 +599,36 @@ Defines the named test set used to verif
 The following parameters can be configured:
 <list type="tag">
 
-<tag-name>
+<tag-name id="match_send">
 <literal>send</literal> <value>string</value>;
 </tag-name>
 <tag-desc>
 sends a <value>string</value> to the server;
 </tag-desc>
 
-<tag-name>
-<literal>expect</literal> <literal>~</literal> <value>regexp</value>;
+<tag-name id="match_expect">
+<literal>expect</literal> <value>string</value> |
+<literal>~</literal> <value>regex</value>;
 </tag-name>
 <tag-desc>
-a regular expression that the data obtained from the server should match.
+a literal string (1.9.12) or a regular expression
+that the data obtained from the server should match.
 The regular expression is specified with the preceding
 “<literal>~*</literal>” modifier (for case-insensitive matching), or the
 “<literal>~</literal>” modifier (for case-sensitive matching).
 </tag-desc>
 
 </list>
+Both <literal>send</literal> and <literal>expect</literal> parameters
+can contain hexadecimal literals with the prefix “<literal>\x</literal>”
+followed by two hex digits, for example, “<literal>\x80</literal>” (1.9.12).
 </para>
 
 <para>
 Health check is passed if:
 <list type="bullet">
 <listitem>
-the connection was successfully established;
+the TCP connection was successfully established;
 </listitem>
 
 <listitem>
@@ -585,7 +637,7 @@ if specified, was sent;
 </listitem>
 
 <listitem>
-the data obtained from the server matched the regular expression
+the data obtained from the server matched the string or regular expression
 from the <literal>expect</literal> parameter, if specified;
 </listitem>
 
--- a/xml/ru/docs/http/ngx_http_core_module.xml
+++ b/xml/ru/docs/http/ngx_http_core_module.xml
@@ -10,7 +10,7 @@
 <module name="Модуль ngx_http_core_module"
         link="/ru/docs/http/ngx_http_core_module.html"
         lang="ru"
-        rev="53">
+        rev="54">
 
 <section id="directives" name="Директивы">
 
@@ -2489,7 +2489,10 @@ server {
 
 
 <directive name="server_tokens">
-<syntax><literal>on</literal> | <literal>off</literal></syntax>
+<syntax>
+    <literal>on</literal> |
+    <literal>off</literal> |
+    <value>строка</value></syntax>
 <default>on</default>
 <context>http</context>
 <context>server</context>
@@ -2500,6 +2503,16 @@ server {
 в поле <header>Server</header> заголовка ответа.
 </para>
 
+<para>
+Дополнительно, как часть
+<commercial_version>коммерческой подписки</commercial_version>,
+начиная с версии 1.9.13
+подписи в сообщениях об ошибках и
+значение поля <header>Server</header> заголовка ответа
+можно задать явно с помощью строки с переменными.
+Пустая строка запрещает выдачу поля <header>Server</header>.
+</para>
+
 </directive>
 
 
--- a/xml/ru/docs/http/ngx_http_upstream_conf_module.xml
+++ b/xml/ru/docs/http/ngx_http_upstream_conf_module.xml
@@ -9,7 +9,7 @@
 <module name="Модуль ngx_http_upstream_conf_module"
         link="/ru/docs/http/ngx_http_upstream_conf_module.html"
         lang="ru"
-        rev="2">
+        rev="3">
 
 <section id="summary">
 
@@ -174,6 +174,16 @@ http://127.0.0.1/upstream_conf?upstream=
 </tag-desc>
 
 <tag-name>
+<literal>service=</literal><value>имя</value></tag-name>
+<tag-desc>
+То же, что и параметр “<literal>service</literal>” сервера группы
+<link doc="ngx_http_upstream_module.xml" id="service">http</link>
+или
+<link doc="../stream/ngx_stream_upstream_module.xml" id="service">stream</link>
+(1.9.13).
+</tag-desc>
+
+<tag-name>
 <literal>weight=</literal><value>число</value></tag-name>
 <tag-desc>
 То же, что и параметр “<literal>weight</literal>” сервера группы
--- a/xml/ru/docs/http/ngx_http_upstream_module.xml
+++ b/xml/ru/docs/http/ngx_http_upstream_module.xml
@@ -10,7 +10,7 @@
 <module name="Модуль ngx_http_upstream_module"
         link="/ru/docs/http/ngx_http_upstream_module.html"
         lang="ru"
-        rev="46">
+        rev="47">
 
 <section id="summary">
 
@@ -63,6 +63,7 @@ upstream <emphasis>dynamic</emphasis> {
     server backend2.example.com:8080 fail_timeout=5s slow_start=30s;
     server 192.0.2.1                 max_fails=3;
     server backend3.example.com      resolve;
+    server backend4.example.com      service=http resolve;
 
     server backup1.example.com:8080  backup;
     server backup2.example.com:8080  backup;
@@ -263,6 +264,40 @@ http {
 задаёт имя маршрута к серверу.
 </tag-desc>
 
+<tag-name id="service">
+<literal>service</literal>=<value>имя</value> | <value>_имя._протокол</value>
+</tag-name>
+<tag-desc>
+включает преобразование
+<link url="https://tools.ietf.org/html/rfc2782">SRV</link>-записей
+DNS и задаёт <value>имя</value> сервиса
+или <value>имя</value> и <value>протокол</value> в следующем формате:
+<value>_имя._протокол</value> (1.9.13).
+Если задано только <value>имя</value>, то
+используется протокол <literal>TCP</literal>.
+<para>
+Для работы параметра необходимо указать
+параметр <link id="resolve"/> для сервера
+и не указывать порт сервера:
+<example>
+server backend.example.com service=http resolve;
+server backend.example.com service=_http._tcp resolve;
+</example>
+Обе директивы задают одну и ту же SRV-запись:
+<literal>_http._tcp.backend.example.com</literal>.
+</para>
+
+<para>
+SRV-записи с наивысшим приоритетом
+(записи с одинаковым наименьшим значением приоритета)
+преобразуются в основные серверы,
+остальные SRV-записи преобразуются в запасные серверы.
+Если в конфигурации сервера указан параметр <link id="backup"/>,
+высокоприоритетные SRV-записи преобразуются в запасные серверы,
+остальные SRV-записи игнорируются.
+</para>
+</tag-desc>
+
 <tag-name id="slow_start">
 <literal>slow_start</literal>=<value>время</value>
 </tag-name>