# HG changeset patch # User Ruslan Ermilov # Date 1554713108 -10800 # Node ID d5e576eb76773e132b01ee89c621cae47854f6a9 # Parent ee4eccd811cd7146c4e0b00b6f4a01f6b3275595 Updated docs for the upcoming NGINX Plus release. diff --git a/xml/en/docs/http/ngx_http_api_module.xml b/xml/en/docs/http/ngx_http_api_module.xml --- a/xml/en/docs/http/ngx_http_api_module.xml +++ b/xml/en/docs/http/ngx_http_api_module.xml @@ -101,21 +101,21 @@ All API requests include a supported API version in the URI. Examples of API requests with this configuration: -http://127.0.0.1/api/3/ -http://127.0.0.1/api/3/nginx -http://127.0.0.1/api/3/connections -http://127.0.0.1/api/3/http/requests -http://127.0.0.1/api/3/http/server_zones/server_backend -http://127.0.0.1/api/3/http/caches/cache_backend -http://127.0.0.1/api/3/http/upstreams/backend -http://127.0.0.1/api/3/http/upstreams/backend/servers/ -http://127.0.0.1/api/3/http/upstreams/backend/servers/1 -http://127.0.0.1/api/3/http/keyvals/one?key=arg1 -http://127.0.0.1/api/3/stream/ -http://127.0.0.1/api/3/stream/server_zones/server_backend -http://127.0.0.1/api/3/stream/upstreams/ -http://127.0.0.1/api/3/stream/upstreams/backend -http://127.0.0.1/api/3/stream/upstreams/backend/servers/1 +http://127.0.0.1/api/4/ +http://127.0.0.1/api/4/nginx +http://127.0.0.1/api/4/connections +http://127.0.0.1/api/4/http/requests +http://127.0.0.1/api/4/http/server_zones/server_backend +http://127.0.0.1/api/4/http/caches/cache_backend +http://127.0.0.1/api/4/http/upstreams/backend +http://127.0.0.1/api/4/http/upstreams/backend/servers/ +http://127.0.0.1/api/4/http/upstreams/backend/servers/1 +http://127.0.0.1/api/4/http/keyvals/one?key=arg1 +http://127.0.0.1/api/4/stream/ +http://127.0.0.1/api/4/stream/server_zones/server_backend +http://127.0.0.1/api/4/stream/upstreams/ +http://127.0.0.1/api/4/stream/upstreams/backend +http://127.0.0.1/api/4/stream/upstreams/backend/servers/1 @@ -146,14 +146,14 @@ By default, the API is read-only. All API requests should contain a supported API version in the URI. If the request URI equals the location prefix, the list of supported API versions is returned. -The current API version is “3”. +The current API version is “4”. The optional “fields” argument in the request line specifies which fields of the requested objects will be output: -http://127.0.0.1/api/3/nginx?fields=version,build +http://127.0.0.1/api/4/nginx?fields=version,build @@ -185,6 +185,14 @@ Several servers may share the same zone. +The path and method fields of +nginx error object +were removed in version 4. +These fields continue to exist in earlier api versions, +but show an empty value. + + + The /stream/zone_sync/ data were added in version 3. @@ -952,7 +960,7 @@ nested object or list (KeyvalFo PATCH - Modify a key-value or delete a key -Changes the value of the selected key in the key-value pair or deletes a key by setting the key value to null. +Changes the value of the selected key in the key-value pair or deletes a key by setting the key value to null. If synchronization of keyval zones in a cluster is enabled, deletes a key only on a target cluster node. Request parameters: @@ -978,7 +986,7 @@ keyval key not found (KeyvalKey DELETE - Empty the HTTP keyval zone -Deletes all key-value pairs from the HTTP keyval shared memory zone. +Deletes all key-value pairs from the HTTP keyval shared memory zone. If synchronization of keyval zones in a cluster is enabled, empties the keyval zone only on a target cluster node. Possible responses: @@ -1031,7 +1039,6 @@ Possible responses: 200 - Success, returns a collection of "Stream Server Zone" objects for all stream server zones -404 - stream not configured (StreamNotConfigured), returns Error @@ -1066,8 +1073,7 @@ Possible responses: 200 - Success, returns Stream Server Zone -404 - Server zone not found (ServerZoneNotFound), -stream not configured (StreamNotConfigured), returns Error +404 - Server zone not found (ServerZoneNotFound), returns Error @@ -1078,8 +1084,7 @@ Possible responses: 204 - Success -404 - Server zone not found (ServerZoneNotFound), -stream not configured (StreamNotConfigured), returns Error +404 - Server zone not found (ServerZoneNotFound), returns Error 405 - Method disabled (MethodDisabled), returns Error @@ -1108,7 +1113,6 @@ Possible responses: 200 - Success, returns a collection of "Stream Upstream" objects for all stream upstreams -404 - stream not configured (StreamNotConfigured), returns Error @@ -1144,8 +1148,7 @@ Possible responses: 200 - Success, returns Stream Upstream 400 - Upstream is static (UpstreamStatic), returns Error -404 - Upstream not found (UpstreamNotFound), -stream not configured (StreamNotConfigured), returns Error +404 - Upstream not found (UpstreamNotFound), returns Error @@ -1157,8 +1160,7 @@ Possible responses: 204 - Success 400 - Upstream is static (UpstreamStatic), returns Error -404 - Upstream not found (UpstreamNotFound), -stream not configured (StreamNotConfigured), returns Error +404 - Upstream not found (UpstreamNotFound), returns Error 405 - Method disabled (MethodDisabled), returns Error @@ -1186,8 +1188,7 @@ Possible responses: 200 - Success, returns an array of Stream Upstream Servers 400 - Upstream is static (UpstreamStatic), returns Error -404 - Upstream not found (UpstreamNotFound), -stream not configured (StreamNotConfigured), returns Error +404 - Upstream not found (UpstreamNotFound), returns Error @@ -1225,8 +1226,7 @@ invalid “slow_start” (UpstreamBadSlowStart), no resolver defined to resolve (UpstreamConfNoResolver), upstream “name” has no backup (UpstreamNoBackup), upstream “name” memory exhausted (UpstreamOutOfMemory), returns Error -404 - Upstream not found (UpstreamNotFound), -stream not configured (StreamNotConfigured), returns Error +404 - Upstream not found (UpstreamNotFound), returns Error 405 - Method disabled (MethodDisabled), returns Error 415 - JSON error (JsonError), returns Error @@ -1261,8 +1261,7 @@ Possible responses: 400 - Upstream is static (UpstreamStatic), invalid server ID (UpstreamBadServerId), returns Error 404 - Upstream not found (UpstreamNotFound), -server with ID “id” does not exist (UpstreamServerNotFound), -stream not configured (StreamNotConfigured), returns Error +server with ID “id” does not exist (UpstreamServerNotFound), returns Error @@ -1300,8 +1299,7 @@ server “ID” address is immutable (UpstreamServerImmutable), server “ID” weight is immutable (UpstreamServerWeightImmutable), upstream “name” memory exhausted (UpstreamOutOfMemory), returns Error 404 - Upstream not found (UpstreamNotFound), -server with ID “id” does not exist (UpstreamServerNotFound), -stream not configured (StreamNotConfigured), returns Error +server with ID “id” does not exist (UpstreamServerNotFound), returns Error 405 - Method disabled (MethodDisabled), returns Error 415 - JSON error (JsonError), returns Error @@ -1318,8 +1316,7 @@ Possible responses: invalid server ID (UpstreamBadServerId), server “id” not removable (UpstreamServerImmutable), returns Error 404 - Upstream not found (UpstreamNotFound), -server with ID “id” does not exist (UpstreamServerNotFound), -stream not configured (StreamNotConfigured), returns Error +server with ID “id” does not exist (UpstreamServerNotFound), returns Error 405 - Method disabled (MethodDisabled), returns Error @@ -1348,7 +1345,6 @@ Possible responses: 200 - Success, returns a collection of "Stream Keyval Shared Memory Zone" objects for all stream keyvals -404 - stream not configured (StreamNotConfigured), returns Error @@ -1384,8 +1380,7 @@ Possible responses: 200 - Success, returns Stream Keyval Shared Memory Zone 404 - Keyval not found (KeyvalNotFound), -keyval key not found (KeyvalKeyNotFound), -stream not configured (StreamNotConfigured), returns Error +keyval key not found (KeyvalKeyNotFound), returns Error @@ -1408,8 +1403,7 @@ Possible responses: 400 - Key required (KeyvalFormatError), only one key can be added (KeyvalFormatError), nested object or list (KeyvalFormatError), returns Error -404 - Keyval not found (KeyvalNotFound), -stream not configured (StreamNotConfigured), returns Error +404 - Keyval not found (KeyvalNotFound), returns Error 405 - Method disabled (MethodDisabled), returns Error 409 - Key already exists (KeyvalKeyExists), returns Error 415 - JSON error (JsonError), returns Error @@ -1417,7 +1411,7 @@ nested object or list (KeyvalFo PATCH - Modify a key-value or delete a key -Changes the value of the selected key in the key-value pair or deletes a key by setting the key value to null. +Changes the value of the selected key in the key-value pair or deletes a key by setting the key value to null. If synchronization of keyval zones in a cluster is enabled, deletes a key only on a target cluster node. Request parameters: @@ -1436,22 +1430,20 @@ Possible responses: only one key can be updated (KeyvalFormatError), nested object or list (KeyvalFormatError), returns Error 404 - Keyval not found (KeyvalNotFound), -keyval key not found (KeyvalKeyNotFound), -stream not configured (StreamNotConfigured), returns Error +keyval key not found (KeyvalKeyNotFound), returns Error 405 - Method disabled (MethodDisabled), returns Error 415 - JSON error (JsonError), returns Error DELETE - Empty the stream keyval zone -Deletes all key-value pairs from the stream keyval shared memory zone. +Deletes all key-value pairs from the stream keyval shared memory zone. If synchronization of keyval zones in a cluster is enabled, empties the keyval zone only on a target cluster node. Possible responses: 204 - Success -404 - Keyval not found (KeyvalNotFound), -stream not configured (StreamNotConfigured), returns Error +404 - Keyval not found (KeyvalNotFound), returns Error 405 - Method disabled (MethodDisabled), returns Error @@ -1471,8 +1463,6 @@ Possible responses: 200 - Success, returns Stream Zone Sync Node -404 - Zone sync not configured (ZoneSyncNotConfigured), -stream not configured (StreamNotConfigured), returns Error @@ -3009,18 +2999,6 @@ The total number of records stored in th Error: nginx error object. -path (string) - - -API path. - - -method (string) - - -HTTP method. - - error diff --git a/xml/en/docs/http/ngx_http_api_module_head.xml b/xml/en/docs/http/ngx_http_api_module_head.xml --- a/xml/en/docs/http/ngx_http_api_module_head.xml +++ b/xml/en/docs/http/ngx_http_api_module_head.xml @@ -101,21 +101,21 @@ All API requests include a supported API version in the URI. Examples of API requests with this configuration: -http://127.0.0.1/api/3/ -http://127.0.0.1/api/3/nginx -http://127.0.0.1/api/3/connections -http://127.0.0.1/api/3/http/requests -http://127.0.0.1/api/3/http/server_zones/server_backend -http://127.0.0.1/api/3/http/caches/cache_backend -http://127.0.0.1/api/3/http/upstreams/backend -http://127.0.0.1/api/3/http/upstreams/backend/servers/ -http://127.0.0.1/api/3/http/upstreams/backend/servers/1 -http://127.0.0.1/api/3/http/keyvals/one?key=arg1 -http://127.0.0.1/api/3/stream/ -http://127.0.0.1/api/3/stream/server_zones/server_backend -http://127.0.0.1/api/3/stream/upstreams/ -http://127.0.0.1/api/3/stream/upstreams/backend -http://127.0.0.1/api/3/stream/upstreams/backend/servers/1 +http://127.0.0.1/api/4/ +http://127.0.0.1/api/4/nginx +http://127.0.0.1/api/4/connections +http://127.0.0.1/api/4/http/requests +http://127.0.0.1/api/4/http/server_zones/server_backend +http://127.0.0.1/api/4/http/caches/cache_backend +http://127.0.0.1/api/4/http/upstreams/backend +http://127.0.0.1/api/4/http/upstreams/backend/servers/ +http://127.0.0.1/api/4/http/upstreams/backend/servers/1 +http://127.0.0.1/api/4/http/keyvals/one?key=arg1 +http://127.0.0.1/api/4/stream/ +http://127.0.0.1/api/4/stream/server_zones/server_backend +http://127.0.0.1/api/4/stream/upstreams/ +http://127.0.0.1/api/4/stream/upstreams/backend +http://127.0.0.1/api/4/stream/upstreams/backend/servers/1 @@ -146,14 +146,14 @@ By default, the API is read-only. All API requests should contain a supported API version in the URI. If the request URI equals the location prefix, the list of supported API versions is returned. -The current API version is “3”. +The current API version is “4”. The optional “fields” argument in the request line specifies which fields of the requested objects will be output: -http://127.0.0.1/api/3/nginx?fields=version,build +http://127.0.0.1/api/4/nginx?fields=version,build @@ -185,6 +185,14 @@ Several servers may share the same zone. +The path and method fields of +nginx error object +were removed in version 4. +These fields continue to exist in earlier api versions, +but show an empty value. + + + The /stream/zone_sync/ data were added in version 3. diff --git a/xml/en/docs/http/ngx_http_upstream_hc_module.xml b/xml/en/docs/http/ngx_http_upstream_hc_module.xml --- a/xml/en/docs/http/ngx_http_upstream_hc_module.xml +++ b/xml/en/docs/http/ngx_http_upstream_hc_module.xml @@ -9,7 +9,7 @@ + rev="5">
@@ -290,6 +290,17 @@ body does not match regular expression “Welcome to nginx!” + + + +require + $variable + ...; + +all specified variables are not empty and not equal to “0” (1.15.9). + + + @@ -328,6 +339,18 @@ match server_ok { } + +# status is 200 or 204 +map $upstream_status $good_status { + 200 1; + 204 1; +} + +match server_ok { + require $good_status; +} + + diff --git a/xml/en/docs/stream/ngx_stream_proxy_module.xml b/xml/en/docs/stream/ngx_stream_proxy_module.xml --- a/xml/en/docs/stream/ngx_stream_proxy_module.xml +++ b/xml/en/docs/stream/ngx_stream_proxy_module.xml @@ -9,7 +9,7 @@ + rev="23">
@@ -296,6 +296,40 @@ session is still not finished, the respo + +on | off +off +stream +server +1.15.8 + + +Enables terminating all sessions to a proxied server +after it was removed from the group or marked as permanently unavailable. +This can occur because of +re-resolve +or with the API +DELETE +command. +A server can be marked as permanently unavailable if it is considered +unhealthy +or with the API +PATCH +command. +Each session is terminated when the next +read or write event is processed for the client or proxied server. + + + + +This directive is available as part of our +commercial subscription. + + + + + + on | off off diff --git a/xml/ru/docs/http/ngx_http_upstream_hc_module.xml b/xml/ru/docs/http/ngx_http_upstream_hc_module.xml --- a/xml/ru/docs/http/ngx_http_upstream_hc_module.xml +++ b/xml/ru/docs/http/ngx_http_upstream_hc_module.xml @@ -9,7 +9,7 @@ + rev="5">
@@ -293,6 +293,17 @@ http { + + + +require + $переменная + ...; + +все указанные переменные непустые и не равны “0” (1.15.9). + + + @@ -331,6 +342,18 @@ match server_ok { } + +# код ответа равен 200 или 204 +map $upstream_status $good_status { + 200 1; + 204 1; +} + +match server_ok { + require $good_status; +} + + diff --git a/xml/ru/docs/stream/ngx_stream_proxy_module.xml b/xml/ru/docs/stream/ngx_stream_proxy_module.xml --- a/xml/ru/docs/stream/ngx_stream_proxy_module.xml +++ b/xml/ru/docs/stream/ngx_stream_proxy_module.xml @@ -9,7 +9,7 @@ + rev="23">
@@ -297,6 +297,38 @@ Cессия завершится после отправки всех принятых датаграмм + +on | off +off +stream +server +1.15.8 + + +Позволяет завершить все сессии к проксируемому серверу, +если он был удалён из группы или помечен как постоянно недоступный. +Это может произойти вследствие повторного +преобразования имён +в адреса, а также при помощи команды API +DELETE. +Сервер может быть помечен как постоянно недоступный в случае неуспешной +проверки работоспособности, +а также при помощи команды API +PATCH. +Сессия завершается при обработке очередного +события чтения или записи на стороне клиента или проксируемого сервера. + + + + +Эта директива доступна как часть +коммерческой подписки. + + + + + + on | off off