# HG changeset patch # User Egor Nikitin # Date 1375424929 -14400 # Node ID 488a3f738db02186de377b782bc2bd0eb39954e4 # Parent 28d580f1eb6369c97b4b8940b15cc3a2b0bf9857 Text revision of commercial modules. diff -r 28d580f1eb63 -r 488a3f738db0 xml/en/docs/http/ngx_http_f4f_module.xml --- a/xml/en/docs/http/ngx_http_f4f_module.xml Fri Aug 02 13:01:50 2013 +0400 +++ b/xml/en/docs/http/ngx_http_f4f_module.xml Fri Aug 02 10:28:49 2013 +0400 @@ -14,13 +14,13 @@
-The module ngx_http_f4f_module provides +The ngx_http_f4f_module module provides server-side support for Adobe HTTP Dynamic Streaming (HDS). -This module implements handling of HTTP Dynamic Streaming requests in a -“/videoSeg1-Frag1” form, extracting needed fragment +This module implements handling of HTTP Dynamic Streaming requests in the +“/videoSeg1-Frag1” form — extracting the needed fragment from the videoSeg1.f4f file using the videoSeg1.f4x index file. This module is an alternative to the Adobe’s f4f module (HTTP Origin Module) @@ -63,7 +63,7 @@ location -Turns on module processing in a surrounding location. +Turns on module processing in the surrounding location. @@ -77,7 +77,8 @@ location -Sets the size of a memory buffer used for reading .f4x index file. +Sets the size of a memory buffer used for reading the .f4x index +file. diff -r 28d580f1eb63 -r 488a3f738db0 xml/en/docs/http/ngx_http_hls_module.xml --- a/xml/en/docs/http/ngx_http_hls_module.xml Fri Aug 02 13:01:50 2013 +0400 +++ b/xml/en/docs/http/ngx_http_hls_module.xml Fri Aug 02 10:28:49 2013 +0400 @@ -14,18 +14,19 @@
-The module ngx_http_hls_module provides HTTP Live Streaming -(HLS) server-side support for H.264/AAC files typically having filename -extensions .mp4, .m4v, and .m4a. +The ngx_http_hls_module module provides HTTP Live Streaming +(HLS) server-side support for H.264/AAC files. +Such files typically have the .mp4, .m4v, +or .m4a filename extensions. -Two URIs are supported for each MP4 file: +nginx supports two URIs for each MP4 file: The playlist URI that ends with “.m3u8” and accepts -the optional “len” argument that defines fragment length +the optional “len” argument that defines the fragment length in seconds; @@ -60,7 +61,7 @@ alias /var/video/; } -For example, the following URIs are supported for +With this configuration, the following URIs are supported for the “/var/video/test.mp4” file: http://hls.example.com/video/test.mp4.m3u8?len=8.000 @@ -79,7 +80,7 @@ location -Turns on HLS streaming in a surrounding location. +Turns on HLS streaming in the surrounding location. @@ -94,7 +95,7 @@ Sets the maximum number and size of buffers -for reading and writing data frames. +that are used for reading and writing data frames. @@ -108,7 +109,7 @@ location -Defines fragment length for playlist URIs requested without the +Defines the default fragment length for playlist URIs requested without the “len” argument. @@ -123,7 +124,7 @@ location -Sets the initial size of a memory buffer used to +Sets the initial size of the memory buffer used to process MP4 files. @@ -142,7 +143,7 @@ Its size cannot exceed the specified size, or else nginx will return the server error , -and log the following: +and log the following message: "/some/movie/file.mp4" mp4 moov atom is too large: 12583268, you may want to increase hls_mp4_max_buffer_size diff -r 28d580f1eb63 -r 488a3f738db0 xml/en/docs/http/ngx_http_log_module.xml --- a/xml/en/docs/http/ngx_http_log_module.xml Fri Aug 02 13:01:50 2013 +0400 +++ b/xml/en/docs/http/ngx_http_log_module.xml Fri Aug 02 10:28:49 2013 +0400 @@ -185,10 +185,11 @@ server=address -Defines an address of a syslog server. -An address can be specified as a domain name or IP address, -and an optional port, or as a UNIX-domain socket path -specified after the “unix:” prefix. +Defines the address of a syslog server. +The address can be specified as a domain name, IP address, or +a UNIX-domain socket path (specified after the “unix:” +prefix). +With a domain name or IP address, the port can be specified. If port is not specified, the port 514 is used. If a domain name resolves to several IP addresses, the first resolved address is used. @@ -220,7 +221,7 @@ tag=string -Sets tag of syslog messages. +Sets the tag of syslog messages. Default is “nginx”. diff -r 28d580f1eb63 -r 488a3f738db0 xml/en/docs/http/ngx_http_mp4_module.xml --- a/xml/en/docs/http/ngx_http_mp4_module.xml Fri Aug 02 13:01:50 2013 +0400 +++ b/xml/en/docs/http/ngx_http_mp4_module.xml Fri Aug 02 10:28:49 2013 +0400 @@ -172,11 +172,11 @@ location -Enables or disables rate limiting based on an average bitrate of the +Enables or disables rate limiting based on the average bitrate of the MP4 file served. -To calculate the rate, bitrate is multiplied by the specified +To calculate the rate, the bitrate is multiplied by the specified factor. -The special value “on” corresponds to a factor of 1.1. +The special value “on” corresponds to the factor of 1.1. @@ -196,7 +196,7 @@ location -Limits rate after sending the specified amount of media data. +Limits the rate after sending the specified amount of media data. diff -r 28d580f1eb63 -r 488a3f738db0 xml/en/docs/http/ngx_http_session_log_module.xml --- a/xml/en/docs/http/ngx_http_session_log_module.xml Fri Aug 02 13:01:50 2013 +0400 +++ b/xml/en/docs/http/ngx_http_session_log_module.xml Fri Aug 02 10:28:49 2013 +0400 @@ -14,8 +14,8 @@
-The module ngx_http_session_log_module allows to log -sessions (i.e. aggregates of multiple HTTP requests) instead of +The ngx_http_session_log_module module enables logging +sessions (that is, aggregates of multiple HTTP requests) instead of individual HTTP requests. @@ -31,7 +31,8 @@
-Log sessions based on client address and
User-Agent
+The following configuration sets up a session log and maps requests to +sessions according to the request client address and
User-Agent
request header field: session_log_zone /path/to/log format=combined @@ -57,10 +58,11 @@ http -Specifies format of a log. -Value of the $body_bytes_sent variable is aggregated across -all requests in the session. -Everything else corresponds to the first request that started a session. +Specifies the output format of a log. +The value of the $body_bytes_sent variable is aggregated across +all requests in a session. +The values of all other variables available for logging correspond to the +first request in a session. @@ -79,32 +81,34 @@ http -Sets path to log file and shared memory zone used to store currently active -sessions. +Sets the path to a log file and configures the shared memory zone that is used +to store currently active sessions. -Sessions are considered active for as long as the time elapsed since -the last request in the session does not exceed a specified +A session is considered active for as long as the time elapsed since +the last request in the session does not exceed the specified timeout (by default, 30 seconds). -Session is logged once it is no longer active. +Once a session is no longer active, it is written to the log. -Requests are mapped into sessions based on the value of the -id parameter. -If id is not specified or does not represent the valid -MD5 hash, a new session is created using MD5 hash computed from the value -of the md5 parameter. -Both id and md5 parameters +The id parameter identifies the +session to which a request is mapped. +The id parameter is set to the hexadecimal representation +of an MD5 hash (for example, obtained from a cookie using variables). +If this parameter is not specified or does not represent the valid +MD5 hash, nginx computes the MD5 hash from the value of +the md5 parameter and creates a new session using this hash. +Both the id and md5 parameters can contain variables. -The format parameter can be used to set custom session log -format. -If format is not specified then the predefined format -“combined” is used. +The format parameter sets the custom session log +format configured by the directive. +If format is not specified, the predefined +“combined” format is used. @@ -118,7 +122,7 @@ location -Use the specified session log. +Enables the use of the specified session log. The special value off cancels all session_log directives inherited from the previous configuration level. diff -r 28d580f1eb63 -r 488a3f738db0 xml/en/docs/http/ngx_http_upstream_module.xml --- a/xml/en/docs/http/ngx_http_upstream_module.xml Fri Aug 02 13:01:50 2013 +0400 +++ b/xml/en/docs/http/ngx_http_upstream_module.xml Fri Aug 02 10:28:49 2013 +0400 @@ -447,7 +447,7 @@ location -Enables periodic health checks of servers in a +Enables periodic health checks of the servers in a group referenced in the surrounding location. @@ -457,35 +457,35 @@ interval -sets interval between two consecutive health checks, -defaults to five seconds; +sets the interval between two consecutive health checks, +by default, 5 seconds; fails -sets a number of consecutive failed health checks -after which the server will be considered unhealthy, -defaults to 1; +sets the number of consecutive failed health checks of a particular server +after which this server will be considered unhealthy, +by default, 1; passes -sets a number of consecutive passed health checks +sets the number of consecutive passed health checks of a particular server after which the server will be considered healthy, -defaults to 1; +by default, 1; uri defines the URI used in health check requests, -defaults to “/”; +by default, “/”; match -names tests that a response should -pass in order for a health check to pass, -defaults to responses with status codes 2xx and 3xx. +specifies the match block configuring the tests that a +response should pass in order for a health check to pass; +by default, the response should have status code 2xx or 3xx. @@ -500,21 +500,21 @@ } will send “/” requests to each -server in the group backend every five seconds. -If any communication errors or timeouts occur, or if a +server in the backend group every five seconds. +If any communication error or timeout occurs, or a proxied server responds with the status code other than -2xx or 3xx, health check will fail, and the server will -become unhealthy. -Client requests will not be passed to unhealthy servers. +2xx or 3xx, the health check will fail, and the server will +be considered unhealthy. +Client requests are not passed to unhealthy servers.
-Health checks can be configured to test status code of a response, +Health checks can be configured to test the status code of a response, presence of certain header fields and their values, -and/or the body contents. -Tests are configured separately with the directives +and the body contents. +Tests are configured separately using the directive and referenced in the match parameter. -For example, +For example: http { server { @@ -532,19 +532,20 @@ } } -tells that for a health check to pass, a response should succeed, +This configuration tells that for a health check to pass, the response to a +health check request should succeed, have status 200, content type “text/html”, and contain “Welcome to nginx!” in the body. -It is required that a group be in shared memory. +The server group must reside in the shared memory. If several health checks are defined for the same group of servers, -a single failure of any check will make the corresponding server -to become unhealthy. +a single failure of any check will make the corresponding server be +considered unhealthy. @@ -566,7 +567,7 @@ -The following can be tested in a response: +The following items can be tested in a response: status 200; @@ -588,7 +589,7 @@ status is not in the 400..599 range status 301-303 307; -status is one of 301, 302, 303, or 307 +status is either 301, 302, 303, or 307 @@ -643,9 +644,9 @@ If several tests are specified, -the response matches only if it passes all tests. +the response matches only if it matches all tests. -Only the first 256k of body are examined. +Only the first 256k of the response body are examined. @@ -697,10 +698,10 @@ Enables session affinity support. The session is an object that is used to uniquely identify and maintain the state of a client during a given period of time. -If session affinity is enabled, a client’s requests are always passed to the -same server (in a group of servers) once a session has been created. -Method used to create and track sessions must be specified by a separate -directive, for example, . +If session affinity is enabled, requests from the same client are always passed +to the same server (in a group of servers) once a session has been created. +The method that is used to create and track sessions must be specified in a +separate directive, for example, . upstream backend { server backend1.example.com; @@ -721,26 +722,26 @@ -Requests are processed as follows with the session affinity enabled: +When the session affinity is enabled, a request is processed as follows: -The lookup of session corresponding to request is performed. -If the session is found, server identification data is extracted from it. +nginx looks up the session corresponding to the request. +If the session is found, the server identification data is extracted from it. This data is used by the server selection algorithm. The server to process the request is chosen according to the configured -balancing method, server information from session and the real state of -servers in a group (up or down, failed, etc.). +balancing method, server information from the session, and the real state of +servers in a group (such as failed, up or down). The request is passed to the chosen server for processing. -If the chosen server does not match specified in the session -(due to being down, for example), the session is cleared -and the request is processed as it had no session. +If the chosen server is not the one specified in the session +(for example, because it is down), the session is cleared +and the request is processed as if it had no session. @@ -748,8 +749,8 @@ -If there was no session for the request, new session -is created and server identification data is stored in it. +If there is no session for the request, a new session +is created and the server identification data is stored in it. @@ -773,7 +774,7 @@ upstream -Enables and configures the session tracking method, based on keeping +Enables and configures the session tracking method that is based on keeping session information in HTTP cookies. The directive must be specified after the or the directives. @@ -787,7 +788,7 @@ expires -Sets a time during which a browser should keep the cookie. +Sets the time for which a browser should keep the cookie. The parameter “max” sets the time to “31 Dec 2037 23:55:55 GMT”. This is the maximum time understood by old browsers. @@ -795,16 +796,16 @@ domain -Defines a domain for which the cookie is set. +Defines the domain for which the cookie is set. path -Defines a path for which the cookie is set. +Defines the path for which the cookie is set. -If some parameter is omitted, then the corresponding cookie field is not set. +If some parameter is omitted, the corresponding cookie field is not set. @@ -845,13 +846,14 @@ location -Turns on upstream configuration HTTP interface in a surrounding location. +Turns on the HTTP interface of upstream configuration in the surrounding +location. Access to this location should be limited. -Configuration commands allow to: +Configuration commands can be used to: view all primary or backup servers in a group; @@ -860,22 +862,23 @@ modify an individual server; -add a new server (see note below); +add a new server (see the note below); remove an individual server. -As noted in the directive, adding a server specified -as a domain name may result in several servers being added. +As noted in the directive, specifying a server +as a domain name may result in several servers being added to the group. Since addresses in a group are not required to be unique, individual servers in a group can be uniquely referenced to only by their ID. -IDs are assigned automatically and shown when viewing group configuration. +IDs are assigned automatically and shown on viewing of the group configuration. -A command consists of parameters passed as request arguments, for example: +A configuration command consists of parameters passed as request arguments, +for example: http://127.0.0.1/upstream_conf?upstream=appservers @@ -897,7 +900,7 @@ backup= -If unset, selects primary servers in the group. +If not set, selects primary servers in the group. If set, selects backup servers in the group. @@ -971,27 +974,27 @@ The first three parameters select a target the command applies to. -Without other parameters, configuration of the selected target -is shown. +Without other parameters, the command shows configuration of the selected +target. -For example, to view the primary servers in the group: +For example, to view the primary servers in the group, send: http://127.0.0.1/upstream_conf?upstream=appservers -To view the backup servers in the group: +To view the backup servers in the group, send: http://127.0.0.1/upstream_conf?upstream=appservers&backup= -To view an individual primary server in the group: +To view an individual primary server in the group, send: http://127.0.0.1/upstream_conf?upstream=appservers&id=42 -To view an individual backup server in the group: +To view an individual backup server in the group, send: http://127.0.0.1/upstream_conf?upstream=appservers&backup=&id=42 @@ -999,25 +1002,25 @@ To add a new primary or backup server to the group, -its address should be specified in the “server=” parameter. +specify its address in the “server=” parameter. Without other parameters specified, a server will be added with other parameters set to their default values (see the directive). -For example, to add a new primary server to the group: +For example, to add a new primary server to the group, send: http://127.0.0.1/upstream_conf?add=&upstream=appservers&server=127.0.0.1:8080 -To add a new backup server to the group: +To add a new backup server to the group, send: http://127.0.0.1/upstream_conf?add=&upstream=appservers&backup=&server=127.0.0.1:8080 To add a new primary server to the group, set its parameters to non-default values -and mark it “down”: +and mark it as “down” by sending: http://127.0.0.1/upstream_conf?add=&upstream=appservers&server=127.0.0.1:8080&weight=2&max_fails=3&fail_timeout=3s&down= @@ -1025,16 +1028,16 @@ To remove an individual primary or backup server from the group, -it should be selected with the id= parameter. +select it with the id= parameter. -For example, to remove an individual primary server from the group: +For example, to remove an individual primary server from the group, send: http://127.0.0.1/upstream_conf?remove=&upstream=appservers&id=42 -To remove an individual backup server from the group: +To remove an individual backup server from the group, send: http://127.0.0.1/upstream_conf?remove=&upstream=appservers&backup=&id=42 @@ -1042,22 +1045,22 @@ To modify an individual primary or backup server in the group, -it should be selected with the id= parameter. +select it with the id= parameter. For example, to modify an individual primary server in the group -by marking it “down”: +by marking it as “down”, send: http://127.0.0.1/upstream_conf?upstream=appservers&id=42&down= -To modify address of an individual backup server in the group: +To modify the address of an individual backup server in the group, send: http://127.0.0.1/upstream_conf?upstream=appservers&backup=&id=42&server=192.0.2.3:8123 -To modify other parameters of an individual primary server in the group: +To modify other parameters of an individual primary server in the group, send: http://127.0.0.1/upstream_conf?upstream=appservers&id=42&max_fails=3&weight=4