# HG changeset patch # User Ruslan Ermilov # Date 1460236369 -10800 # Node ID 57c3f36b3b6a770e618e9b493a52b388421c103f # Parent e9ad1cae4401d6854dbde696d23f215e5f817052 Updated docs for the upcoming NGINX Plus release. diff --git a/xml/en/docs/http/ngx_http_core_module.xml b/xml/en/docs/http/ngx_http_core_module.xml --- a/xml/en/docs/http/ngx_http_core_module.xml +++ b/xml/en/docs/http/ngx_http_core_module.xml @@ -10,7 +10,7 @@ + rev="54">
@@ -2488,7 +2488,10 @@ The details of setting up hash tables ar -on | off + + on | + off | + string on http server @@ -2499,6 +2502,16 @@ Enables or disables emitting nginx versi
Server
response header field. + +Additionally, as part of our +commercial subscription, +starting from version 1.9.13 +the signature in error messages and +the
Server
response header field value +can be set explicitly using the string with variables. +An empty string disables the emission of the
Server
field. +
+
diff --git a/xml/en/docs/http/ngx_http_upstream_conf_module.xml b/xml/en/docs/http/ngx_http_upstream_conf_module.xml --- 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 @@ + rev="3">
@@ -175,6 +175,17 @@ upstream server. +service=name + +Same as the “service” parameter +of the +http +or +stream +upstream server (1.9.13). + + + weight=number Same as the “weight” parameter diff --git a/xml/en/docs/http/ngx_http_upstream_module.xml b/xml/en/docs/http/ngx_http_upstream_module.xml --- a/xml/en/docs/http/ngx_http_upstream_module.xml +++ b/xml/en/docs/http/ngx_http_upstream_module.xml @@ -10,7 +10,7 @@ + rev="47">
@@ -62,6 +62,7 @@ upstream dynamic { 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. + +service=name | _name._protocol + + +enables resolving of DNS +SRV +records and sets the service name, +or name and protocol in the following format: +_name._protocol (1.9.13). +If only the name is specified, +the TCP protocol is used. + +In order for this parameter to work, it is necessary to specify +the parameter for the server +and specify a hostname without a port number: + +server backend.example.com service=http resolve; +server backend.example.com service=_http._tcp resolve; + +Both directives specify the same SRV record: +_http._tcp.backend.example.com. + + + +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 parameter is specified for the server, +high-priority SRV records are resolved as backup servers, +the rest of SRV records are ignored. + + + slow_start=time diff --git a/xml/en/docs/stream/ngx_stream_upstream_module.xml b/xml/en/docs/stream/ngx_stream_upstream_module.xml --- a/xml/en/docs/stream/ngx_stream_upstream_module.xml +++ b/xml/en/docs/stream/ngx_stream_upstream_module.xml @@ -9,7 +9,7 @@ + rev="11">
@@ -59,6 +59,7 @@ upstream dynamic { 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 { + +service=name | _name._protocol + + +enables resolving of DNS +SRV +records and sets the service name, +or name and protocol in the following format: +_name._protocol (1.9.13). +If only the name is specified, +the TCP protocol is used. + +In order for this parameter to work, it is necessary to specify +the parameter for the server +and specify a hostname without a port number: + +server backend.example.com service=http resolve; +server backend.example.com service=_http._tcp resolve; + +Both directives specify the same SRV record: +_http._tcp.backend.example.com. + + + +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 parameter is specified for the server, +high-priority SRV records are resolved as backup servers, +the rest of SRV records are ignored. + + + slow_start=time @@ -459,8 +494,9 @@ by default, 1; specifies the match 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; @@ -469,7 +505,18 @@ by default, only the ability to connect defines the port used when connecting to a server to perform a health check (1.9.7); -by default, equals the port. +by default, equals the port; + + + +udp + + +specifies that the UDP protocol should be used for +health checks instead of the default TCP protocol (1.9.13); +requires a match block with the +send and expect +parameters. @@ -483,8 +530,8 @@ server { health_check; } -will check the ability to connect to each -server in the backend group every five seconds. +will check the ability to establish a TCP connection to each server +in the backend 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: - + send string; sends a string to the server; - -expect ~ regexp; + +expect string | +~ regex; -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 “~*” modifier (for case-insensitive matching), or the “~” modifier (for case-sensitive matching). +Both send and expect parameters +can contain hexadecimal literals with the prefix “\x” +followed by two hex digits, for example, “\x80” (1.9.12). Health check is passed if: -the connection was successfully established; +the TCP connection was successfully established; @@ -585,7 +637,7 @@ if specified, was sent; -the data obtained from the server matched the regular expression +the data obtained from the server matched the string or regular expression from the expect parameter, if specified; diff --git a/xml/ru/docs/http/ngx_http_core_module.xml b/xml/ru/docs/http/ngx_http_core_module.xml --- a/xml/ru/docs/http/ngx_http_core_module.xml +++ b/xml/ru/docs/http/ngx_http_core_module.xml @@ -10,7 +10,7 @@ + rev="54">
@@ -2489,7 +2489,10 @@ server { -on | off + + on | + off | + строка on http server @@ -2500,6 +2503,16 @@ server { в поле
Server
заголовка ответа. + +Дополнительно, как часть +коммерческой подписки, +начиная с версии 1.9.13 +подписи в сообщениях об ошибках и +значение поля
Server
заголовка ответа +можно задать явно с помощью строки с переменными. +Пустая строка запрещает выдачу поля
Server
. +
+
diff --git a/xml/ru/docs/http/ngx_http_upstream_conf_module.xml b/xml/ru/docs/http/ngx_http_upstream_conf_module.xml --- 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 @@ + rev="3">
@@ -174,6 +174,16 @@ http://127.0.0.1/upstream_conf?upstream= +service=имя + +То же, что и параметр “service” сервера группы +http +или +stream +(1.9.13). + + + weight=число То же, что и параметр “weight” сервера группы diff --git a/xml/ru/docs/http/ngx_http_upstream_module.xml b/xml/ru/docs/http/ngx_http_upstream_module.xml --- a/xml/ru/docs/http/ngx_http_upstream_module.xml +++ b/xml/ru/docs/http/ngx_http_upstream_module.xml @@ -10,7 +10,7 @@ + rev="47">
@@ -63,6 +63,7 @@ upstream dynamic { 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 { задаёт имя маршрута к серверу. + +service=имя | _имя._протокол + + +включает преобразование +SRV-записей +DNS и задаёт имя сервиса +или имя и протокол в следующем формате: +_имя._протокол (1.9.13). +Если задано только имя, то +используется протокол TCP. + +Для работы параметра необходимо указать +параметр для сервера +и не указывать порт сервера: + +server backend.example.com service=http resolve; +server backend.example.com service=_http._tcp resolve; + +Обе директивы задают одну и ту же SRV-запись: +_http._tcp.backend.example.com. + + + +SRV-записи с наивысшим приоритетом +(записи с одинаковым наименьшим значением приоритета) +преобразуются в основные серверы, +остальные SRV-записи преобразуются в запасные серверы. +Если в конфигурации сервера указан параметр , +высокоприоритетные SRV-записи преобразуются в запасные серверы, +остальные SRV-записи игнорируются. + + + slow_start=время