Mercurial > hg > nginx-site
changeset 958:fd1f8e0a405e
Text review of ngx_http_core_module.
author | Egor Nikitin <yegor.nikitin@gmail.com> |
---|---|
date | Tue, 06 Aug 2013 17:03:33 +0400 |
parents | 6d9d4bb571a9 |
children | fbb4cc6f8c3d |
files | xml/en/docs/http/ngx_http_core_module.xml xml/ru/docs/http/ngx_http_core_module.xml |
diffstat | 2 files changed, 301 insertions(+), 300 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_core_module.xml Sat Jun 08 20:55:52 2013 +0400 +++ b/xml/en/docs/http/ngx_http_core_module.xml Tue Aug 06 17:03:33 2013 +0400 @@ -31,7 +31,7 @@ </para> <para> -On FreeBSD, AIO is usable starting from FreeBSD 4.3. +On FreeBSD, AIO can be used starting from FreeBSD 4.3. AIO can either be linked statically into a kernel: <example> options VFS_AIO @@ -45,7 +45,7 @@ <para> In FreeBSD versions 5 and 6, enabling AIO statically, or dynamically when booting the kernel, will cause the entire networking subsystem -to use the Giant lock that can impact overall performance negatively. +to use the Giant lock, which can impact overall performance negatively. This limitation has been removed in FreeBSD 6.4-STABLE in 2009, and in FreeBSD 7. However, starting from FreeBSD 5.3 it is possible to enable AIO @@ -66,7 +66,7 @@ and <c-func>aio_write</c-func> when working with sockets. -However, since nginx only uses AIO for disk I/O, no problems should arise. +However, since nginx uses AIO only for disk I/O, no problems should arise. </note> </para> @@ -94,23 +94,20 @@ } </example> In this configuration, <c-func>sendfile</c-func> is called with -the <c-def>SF_NODISKIO</c-def> flag which causes it not to -block on disk I/O and instead report back when the data are not in -memory; nginx then initiates an asynchronous data load by reading -one byte. -The FreeBSD kernel then loads the first 128K bytes -of a file into memory, however next reads will only load data -in 16K chunks. -This can be tuned using the -<link id="read_ahead"/> -directive. +the <c-def>SF_NODISKIO</c-def> flag which causes it not to block on disk I/O, +but, instead, report back that the data are not in memory. +nginx then initiates an asynchronous data load by reading one byte. +On the first read, the FreeBSD kernel loads the first 128K bytes +of a file into memory, although next reads will only load data in 16K chunks. +This can be changed using the +<link id="read_ahead"/> directive. </para> <para> -On Linux, AIO is usable starting from kernel version 2.6.22; -plus, it is also necessary to enable +On Linux, AIO can be used starting from kernel version 2.6.22. +Also, it is necessary to enable <link id="directio"/>, -otherwise reading will be blocking: +or otherwise reading will be blocking: <example> location /video/ { aio on; @@ -125,13 +122,13 @@ <link id="directio"/> can only be used for reading blocks that are aligned on 512-byte boundaries (or 4K for XFS). -Reading of unaligned file’s end is still made in blocking mode. -The same holds true for byte range requests, and for FLV requests +File’s unaligned end is read in blocking mode. +The same holds true for byte range requests and for FLV requests not from the beginning of a file: reading of unaligned data at the beginning and end of a file will be blocking. There is no need to turn off <link id="sendfile"/> -explicitly as it is turned off automatically when +explicitly, as it is turned off automatically when <link id="directio"/> is used. </para> @@ -152,14 +149,13 @@ alias /data/w3/images/; } </example> -the request of -“<literal>/i/top.gif</literal>” will be responded -with the file -<path>/data/w3/images/top.gif</path>. +on request of +“<literal>/i/top.gif</literal>”, the file +<path>/data/w3/images/top.gif</path> will be sent. </para> <para> -The <value>path</value> value can contain variables +The <value>path</value> value can contain variables, except <var>$document_root</var> and <var>$realpath_root</var>. </para> @@ -205,7 +201,7 @@ <para> Allows disabling chunked transfer encoding in HTTP/1.1. It may come in handy when using a software failing to support -chunked encoding though the standard requires it. +chunked encoding despite the standard’s requirement. </para> </directive> @@ -221,7 +217,7 @@ <para> Sets buffer size for reading client request body. -In case request body is larger than the buffer, +In case the request body is larger than the buffer, the whole body or only its part is written to a <link id="client_body_temp_path">temporary file</link>. By default, buffer size is equal to two memory pages. @@ -297,13 +293,13 @@ <para> Defines a directory for storing temporary files holding client request bodies. -Up to three-level subdirectory hierarchy can be used underneath the specified +Up to three-level subdirectory hierarchy can be used under the specified directory. For example, in the following configuration <example> client_body_temp_path /spool/nginx/client_temp 1 2; </example> -a temporary file might look like this: +a path to a temporary file might look like this: <example> /spool/nginx/client_temp/7/45/00000123457 </example> @@ -321,12 +317,11 @@ <para> Defines a timeout for reading client request body. -A timeout is only set between two successive read operations, +The timeout is only set for a period between two successive read operations, not for the transmission of the whole request body. -If a client does not transmit anything within this time, -the client error +If a client does not transmit anything within this time, the <http-status code="408" text="Request Time-out"/> -is returned. +error is returned to the client. </para> </directive> @@ -343,10 +338,10 @@ For most requests, a buffer of 1K bytes is enough. However, if a request includes long cookies, or comes from a WAP client, it may not fit into 1K. -If a request line, or a request header field do not fit entirely into -this buffer then larger buffers are allocated, configured by the -<link id="large_client_header_buffers"/> -directive. +If a request line or a request header field does not fit into +this buffer then larger buffers, configured by the +<link id="large_client_header_buffers"/> directive, +are allocated. </para> </directive> @@ -360,10 +355,9 @@ <para> Defines a timeout for reading client request header. -If a client does not transmit the entire header within this time, -the client error +If a client does not transmit the entire header within this time, the <http-status code="408" text="Request Time-out"/> -is returned. +error is returned to the client. </para> </directive> @@ -381,14 +375,14 @@ specified in the <header>Content-Length</header> request header field. -If it exceeds the configured value, the client error +If the size in a request exceeds the configured value, the <http-status code="413" text="Request Entity Too Large"/> -is returned. +error is returned to the client. Please be aware that <!--link doc="/web/upload.xml"-->browsers cannot correctly display this error<!--/link-->. -Setting <value>size</value> to 0 disables client -request body size checking. +Setting <value>size</value> to 0 disables checking of client +request body size. </para> </directive> @@ -401,8 +395,8 @@ <context>server</context> <para> -Allows to fine tune per-connection memory allocations. -This directive has minimal impact on performance, +Allows accurate tuning of per-connection memory allocations. +This directive has minimal impact on performance and should not generally be used. </para> @@ -417,7 +411,7 @@ <context>location</context> <para> -Defines a default MIME-type of a response. +Defines the default MIME-type of a response. Mapping of file name extensions to MIME types can be set with the <link id="types"/> directive. </para> @@ -440,10 +434,10 @@ or the <c-func>directio</c-func> function (Solaris), when reading files that are larger than or equal to the specified <value>size</value>. -It automatically disables (0.7.15) the use of +The directive automatically disables (0.7.15) the use of <link id="sendfile"/> for a given request. -It could be useful for serving large files: +It can be useful for serving large files: <example> directio 4m; </example> @@ -462,10 +456,10 @@ <appeared-in>0.8.11</appeared-in> <para> -Sets an alignment for +Sets the alignment for <link id="directio"/>. -In most cases, a 512-byte alignment is enough, however, when -using XFS under Linux, it needs to be increased to 4K. +In most cases, a 512-byte alignment is enough. +However, when using XFS under Linux, it needs to be increased to 4K. </para> </directive> @@ -512,13 +506,13 @@ (parameters <literal>on</literal> and <literal>if_not_owner</literal>), all components of the pathname are normally checked. Checking of symbolic links in the initial part of the pathname -may be avoided by also specifying the +may be avoided by specifying additionally the <literal>from</literal>=<value>part</value> parameter. In this case, symbolic links are checked only from -the component of the pathname following the specified initial part. -If a value is not an initial part of the checked pathname, the whole +the pathname component that follows the specified initial part. +If the value is not an initial part of the pathname checked, the whole pathname is checked as if this parameter was not specified at all. -If a value fully matches the file name, +If the value matches the whole file name, symbolic links are not checked. The parameter value can contain variables. </tag-desc> @@ -536,16 +530,16 @@ <para> This directive is only available on systems that have the <c-func>openat</c-func> and <c-func>fstatat</c-func> interfaces. -This includes modern versions of FreeBSD, Linux, and Solaris. +Such systems include modern versions of FreeBSD, Linux, and Solaris. </para> <para> Parameters <literal>on</literal> and <literal>if_not_owner</literal> add a processing overhead. <note> -On systems that do not support opening directories for search only, -the use of these parameters requires that worker processes -have read permissions for all checked directories. +On systems that do not support opening of directories only for search, +to use these parameters it is required that worker processes +have read permissions for all directories being checked. </note> </para> @@ -575,11 +569,9 @@ <para> Defines the URI that will be shown for the specified errors. -These directives are inherited from the previous level if and -only if there are no -<literal>error_page</literal> -directives on -the current level. +<literal>error_page</literal> directives are inherited from the previous +level only if there are no <literal>error_page</literal> +directives defined on the current level. A <literal>uri</literal> value can contain variables. </para> @@ -600,9 +592,9 @@ </para> <para> -If an error response is processed by a proxied server, or a FastCGI server, +If an error response is processed by a proxied server or a FastCGI server, and the server may return different response codes (e.g., 200, 302, 401 -or 404), it is possible to respond with a returned code: +or 404), it is possible to respond with the code it returns: <example> error_page 404 = /404.php; </example> @@ -730,7 +722,7 @@ <para> A directive can be specified on the <link id="server"/> level -in a default server. +in the default server. In this case, its value will cover all virtual servers listening on the same address and port. </para> @@ -817,7 +809,7 @@ The <value>browser</value> parameters specify which browsers will be affected. The value <literal>msie6</literal> disables keep-alive connections -with old versions of MSIE, after seeing a POST request. +with old versions of MSIE, once a POST request is received. The value <literal>safari</literal> disables keep-alive connections with Safari and Safari-like browsers on Mac OS X and Mac OS X-like operating systems. @@ -843,8 +835,8 @@ <para> Sets the maximum number of requests that can be -made through one keep-alive connection. -After this many requests are made, the connection is closed. +served through one keep-alive connection. +After the maximum number of requests are made, the connection is closed. </para> </directive> @@ -862,7 +854,7 @@ <para> The first parameter sets a timeout during which a keep-alive client connection will stay open on the server side. -The value of zero disables keep-alive client connections. +The zero value disables keep-alive client connections. The optional second parameter sets a value in the <header>Keep-Alive: timeout=<value>time</value></header> response header field. @@ -872,8 +864,8 @@ <para> The <header>Keep-Alive: timeout=<value>time</value></header> -header field is understood by Mozilla and Konqueror. -MSIE will close keep-alive connection in about 60 seconds. +header field is recognized by Mozilla and Konqueror. +MSIE closes keep-alive connections by itself in about 60 seconds. </para> </directive> @@ -887,18 +879,17 @@ <para> Sets the maximum <value>number</value> and <value>size</value> of -buffers used when reading large client request header. -A request line cannot exceed the size of one buffer, or the client error +buffers used for reading large client request header. +A request line cannot exceed the size of one buffer, or the <http-status code="414" text="Request-URI Too Large"/> -is returned. +error is returned to the client. A request header field cannot exceed the size of one buffer as well, or the -client error <http-status code="400" text="Bad Request"/> -is returned. +error is returned to the client. Buffers are allocated only on demand. By default, the buffer size is equal to 8K bytes. If after the end of request processing a connection is transitioned -into the keep-alive state, these buffers are freed. +into the keep-alive state, these buffers are released. </para> </directive> @@ -927,8 +918,8 @@ <literal>UNLOCK</literal>, or <literal>PATCH</literal>. -Allowing the <literal>GET</literal> method also allows the -<literal>HEAD</literal> method. +Allowing the <literal>GET</literal> method makes the +<literal>HEAD</literal> method also allowed. Access to other methods can be limited using the <link doc="ngx_http_access_module.xml">ngx_http_access_module</link> and @@ -956,14 +947,14 @@ <context>if in location</context> <para> -Rate limits the transmission of a response to a client. +Limits the rate of response transmission to a client. The <value>rate</value> is specified in bytes per second. The value 0 disables rate limiting. <!-- The smaller the rate, the more accurate will be the limitation. --> -The limit is set per request, so if a client simultaneously opens -two connections, an overall rate will be twice as much +The limit is set per a request, and so if a client simultaneously opens +two connections, the overall rate will be twice as much as the specified limit. </para> @@ -984,9 +975,9 @@ </para> <para> -In addition, rate limit can also be set in the +Rate limit can also be set in the <header>X-Accel-Limit-Rate</header> header field of a proxied server response. -This ability can be disabled using the +This capability can be disabled using the <link doc="ngx_http_proxy_module.xml" id="proxy_ignore_headers"/> and <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_ignore_headers"/> @@ -1056,7 +1047,8 @@ <para> The value “<literal>off</literal>” tells nginx to never wait for more data and close the connection immediately. -This breaks the protocol and should not be used under normal circumstances. +This behavior breaks the protocol and should not be used under normal +circumstances. </para> </directive> @@ -1071,9 +1063,10 @@ <para> When <link id="lingering_close"/> is in effect, -this directive specifies a maximum time during which nginx +this directive specifies the maximum time during which nginx will process (read and ignore) additional data coming from a client. -After that, the connection is closed, even if there are more data. +After that, the connection will be closed, even if there will be +more data. </para> </directive> @@ -1088,9 +1081,10 @@ <para> When <link id="lingering_close"/> is in effect, this directive specifies -a maximum waiting time for more client data to arrive. +the maximum waiting time for more client data to arrive. If data are not received during this time, the connection is closed. -Otherwise, data are read and ignored, then nginx waits again for more data. +Otherwise, the data are read and ignored, and nginx starts waiting +for more data again. The “wait-read-ignore” cycle is repeated, but no longer than specified by the <link id="lingering_time"/> directive. </para> @@ -1144,10 +1138,10 @@ <para> Sets an <value>address</value> and a <value>port</value> for IP, -or a <value>path</value> for a UNIX-domain socket, on which +or a <value>path</value> for a UNIX-domain socket on which the server will accept requests. -Only one of <value>address</value> or <value>port</value> may be -specified. +Both <value>address</value> and <value>port</value>, +or only <value>address</value> or only <value>port</value> can be specified. An <value>address</value> may also be a hostname, for example: <example> listen 127.0.0.1:8000; @@ -1173,8 +1167,9 @@ </para> <para> -If directive is not present then either the <literal>*:80</literal> is used -if nginx runs with superuser privileges, or <literal>*:8000</literal> otherwise. +If the directive is not present then either <literal>*:80</literal> is used +if nginx runs with the superuser privileges, or <literal>*:8000</literal> +otherwise. </para> <para> @@ -1192,7 +1187,7 @@ </para> <para> -The <literal>ssl</literal> parameter (0.7.14) allows to specify that all +The <literal>ssl</literal> parameter (0.7.14) allows specifying that all connections accepted on this port should work in SSL mode. This allows for a more compact <link doc="configuring_https_servers.xml" id="single_http_https_server">configuration</link> for the server that @@ -1200,7 +1195,7 @@ </para> <para> -The <literal>spdy</literal> parameter (1.3.15) allows to accept +The <literal>spdy</literal> parameter (1.3.15) allows accepting <link doc="ngx_http_spdy_module.xml">SPDY</link> connections on this port. Normally, for this to work the <literal>ssl</literal> parameter should be specified as well, but nginx can also be configured to accept SPDY @@ -1210,12 +1205,12 @@ <para> A <literal>listen</literal> directive can have several additional parameters specific to socket-related system calls. -They can be specified in any -<literal>listen</literal> directive, but only once for the given +These parameters can be specified in any +<literal>listen</literal> directive, but only once for a given <value>address</value>:<value>port</value> pair. <note> In versions prior to 0.8.21, they could only be -specified in the <literal>listen</literal> directive along with the +specified in the <literal>listen</literal> directive together with the <literal>default</literal> parameter. </note> <list type="tag"> @@ -1224,7 +1219,7 @@ <literal>setfib</literal>=<value>number</value> </tag-name> <tag-desc> -this parameter (0.8.44) sets an associated routing table, FIB +this parameter (0.8.44) sets the associated routing table, FIB (the <c-def>SO_SETFIB</c-def> option) for the listening socket. This currently works only on FreeBSD. </tag-desc> @@ -1244,7 +1239,7 @@ <literal>rcvbuf</literal>=<value>size</value> </tag-name> <tag-desc> -sets receive buffer size +sets the receive buffer size (the <c-def>SO_RCVBUF</c-def> option) for the listening socket. </tag-desc> @@ -1252,7 +1247,7 @@ <literal>sndbuf</literal>=<value>size</value> </tag-name> <tag-desc> -sets send buffer size +sets the send buffer size (the <c-def>SO_SNDBUF</c-def> option) for the listening socket. </tag-desc> @@ -1262,10 +1257,10 @@ <tag-desc> sets the name of accept filter (the <c-def>SO_ACCEPTFILTER</c-def> option) for the listening socket -that filters incoming connections before presenting them to +that filters incoming connections before passing them to <c-func>accept</c-func>. This works only on FreeBSD and NetBSD 5.0+. -Acceptable values are +Possible values are <link url="http://man.freebsd.org/accf_data">dataready</link> and <link url="http://man.freebsd.org/accf_http">httpready</link>. @@ -1285,18 +1280,16 @@ <tag-desc> instructs to make a separate <c-func>bind</c-func> call for a given <value>address</value>:<value>port</value> pair. -This is because nginx will <c-func>bind</c-func> only to -<literal>*:</literal><value>port</value> -if there are several <literal>listen</literal> directives with -the same port but different addresses, and one of the +This is useful because if there are several <literal>listen</literal> +directives with the same port but different addresses, and one of the <literal>listen</literal> directives listens on all addresses -for the given port (<literal>*:</literal><value>port</value>). -It should be noted that in this case a <c-func>getsockname</c-func> -system call will be made to determine an address that accepted a -connection. -If parameters <literal>backlog</literal>, <literal>rcvbuf</literal>, +for the given port (<literal>*:</literal><value>port</value>), nginx +will <c-func>bind</c-func> only to <literal>*:</literal><value>port</value>. +It should be noted that in this case the address that accepted the +connection is determined by a <c-func>getsockname</c-func> system call. +If the <literal>backlog</literal>, <literal>rcvbuf</literal>, <literal>sndbuf</literal>, <literal>accept_filter</literal>, -<literal>deferred</literal>, or <literal>so_keepalive</literal> +<literal>deferred</literal>, or <literal>so_keepalive</literal> parameters are used then for a given <value>address</value>:<value>port</value> pair a separate <c-func>bind</c-func> call will always be made. @@ -1308,8 +1301,8 @@ <tag-desc> this parameter (0.7.42) determines (via the <c-def>IPV6_V6ONLY</c-def> socket option) -whether IPv6 socket listening on a wildcard address <literal>[::]</literal> -will accept only IPv6 connections, or both IPv6 and IPv4 connections. +whether an IPv6 socket listening on a wildcard address <literal>[::]</literal> +will accept only IPv6 connections or both IPv6 and IPv4 connections. This parameter is turned on by default. It can only be set once on start. <note> @@ -1327,24 +1320,24 @@ for the listening socket. If this parameter is omitted then the operating system’s settings will be in effect for the socket. -If set to the value “<literal>on</literal>”, the <c-def>SO_KEEPALIVE</c-def> -socket option is turned on for the socket. -If set to the value “<literal>off</literal>”, the <c-def>SO_KEEPALIVE</c-def> -socket option is turned off for the socket. -Some operating systems support tuning TCP keepalive parameters on a per-socket -basis using the <c-def>TCP_KEEPIDLE</c-def>, <c-def>TCP_KEEPINTVL</c-def>, -and <c-def>TCP_KEEPCNT</c-def> socket options. +If it is set to the value “<literal>on</literal>”, the +<c-def>SO_KEEPALIVE</c-def> option is turned on for the socket. +If it is set to the value “<literal>off</literal>”, the +<c-def>SO_KEEPALIVE</c-def> option is turned off for the socket. +Some operating systems support setting of TCP keepalive parameters on +a per-socket basis using the <c-def>TCP_KEEPIDLE</c-def>, +<c-def>TCP_KEEPINTVL</c-def>, and <c-def>TCP_KEEPCNT</c-def> socket options. On such systems (currently, Linux 2.4+, NetBSD 5+, and -FreeBSD 9.0-STABLE) they can be configured +FreeBSD 9.0-STABLE), they can be configured using the <value>keepidle</value>, <value>keepintvl</value>, and <value>keepcnt</value> parameters. One or two parameters may be omitted, in which case the system default setting for the corresponding socket option will be in effect. For example, <example>so_keepalive=30m::10</example> -will set idle timeout (<c-def>TCP_KEEPIDLE</c-def>) to 30 minutes, -leave probe interval (<c-def>TCP_KEEPINTVL</c-def>) at its system default, -and set probes count (<c-def>TCP_KEEPCNT</c-def>) to 10 probes. +will set the idle timeout (<c-def>TCP_KEEPIDLE</c-def>) to 30 minutes, +leave the probe interval (<c-def>TCP_KEEPINTVL</c-def>) at its system default, +and set the probes count (<c-def>TCP_KEEPCNT</c-def>) to 10 probes. </tag-desc> </list> @@ -1373,12 +1366,12 @@ <context>location</context> <para> -Sets a configuration based on a request URI. +Sets configuration depending on a request URI. </para> <para> The matching is performed against a normalized URI, -after decoding a text encoded in the “<literal>%XX</literal>” form, +after decoding the text encoded in the “<literal>%XX</literal>” form, resolving references to relative path components “<literal>.</literal>” and “<literal>..</literal>”, and possible <link id="merge_slashes">compression</link> of two or more @@ -1387,22 +1380,24 @@ <para> A location can either be defined by a prefix string, or by a regular expression. -Regular expressions are specified by prepending them with the -“<literal>~*</literal>” modifier (for case-insensitive matching), or with the +Regular expressions are specified with the preceding +“<literal>~*</literal>” modifier (for case-insensitive matching), or the “<literal>~</literal>” modifier (for case-sensitive matching). -To find a location matching a given request, nginx first checks +To find location matching a given request, nginx first checks locations defined using the prefix strings (prefix locations). -Among them, the most specific one is searched. +Among them, the location with the longest matching +prefix is selected and remembered. Then regular expressions are checked, in the order of their appearance -in a configuration file. -A search of regular expressions terminates on the first match, +in the configuration file. +The search of regular expressions terminates on the first match, and the corresponding configuration is used. -If no match with a regular expression is found then a -configuration of the most specific prefix location is used. +If no match with a regular expression is found then the +configuration of the prefix location remembered earlier is used. </para> <para> -Locations can be nested, with some exceptions mentioned below. +<literal>location</literal> blocks can be nested, with some exceptions +mentioned below. </para> <para> @@ -1417,7 +1412,7 @@ </para> <para> -If the most specific prefix location has the “<literal>^~</literal>” modifier +If the longest matching prefix location has the “<literal>^~</literal>” modifier then regular expressions are not checked. </para> @@ -1442,7 +1437,7 @@ </para> <para> -Let’s illustrate the above by example: +Let’s illustrate the above by an example: <example> location = / { [ configuration A ] @@ -1491,7 +1486,7 @@ but without the trailing slash, a permanent redirect with the code 301 will be returned to the requested URI with the slash appended. -If this is undesired, an exact match of the URI and location could be +If this is not desired, an exact match of the URI and location could be defined like this: <example> location /user/ { @@ -1519,7 +1514,7 @@ <context>location</context> <para> -Enables or disables logging of errors about not found files into the +Enables or disables logging of errors about not found files into <link doc="../ngx_core_module.xml" id="error_log"/>. </para> @@ -1534,7 +1529,7 @@ <context>location</context> <para> -Enables or disables logging of subrequests into the +Enables or disables logging of subrequests into <link doc="ngx_http_log_module.xml" id="access_log"/>. </para> @@ -1553,8 +1548,8 @@ Limits the maximum allowed number of ranges in byte-range requests. Requests that exceed the limit are processed as if there were no byte ranges specified. -By default, there is no limit. -The value of zero disables the byte-range support completely. +By default, the number of ranges is not limited. +The zero value disables the byte-range support completely. </para> </directive> @@ -1572,30 +1567,30 @@ </para> <para> -Note that compression is essential for the correct prefix string -and regular expressions location matching. +Note that compression is essential for the correct matching of prefix string +and regular expression locations. Without it, the “<literal>//scripts/one.php</literal>” request would not match <example> location /scripts/ { ... } </example> -and might be processed as a static file, -so it gets converted to “<literal>/scripts/one.php</literal>”. +and might be processed as a static file. +So it gets converted to “<literal>/scripts/one.php</literal>”. </para> <para> Turning the compression <literal>off</literal> can become necessary if a URI contains base64-encoded names, since base64 uses the “<literal>/</literal>” character internally. -However, for security considerations, it is better to avoid turning off -the compression. +However, for security considerations, it is better to avoid turning +the compression off. </para> <para> A directive can be specified on the <link id="server"/> level -in a default server. -In this case, its value will cover all virtual servers +in the default server. +In this case, its value will apply to all virtual servers listening on the same address and port. </para> @@ -1610,8 +1605,8 @@ <context>location</context> <para> -Enables or disables adding of comments to responses with status -greater than 400 for MSIE clients, to pad the response size to 512 bytes. +Enables or disables adding comments to responses for MSIE clients with status +greater than 400 to increase the response size to 512 bytes. </para> </directive> @@ -1625,7 +1620,7 @@ <context>location</context> <para> -Enables or disables issuing refreshes instead of redirects, for MSIE clients. +Enables or disables issuing refreshes instead of redirects for MSIE clients. </para> </directive> @@ -1650,7 +1645,7 @@ </listitem> <listitem> -directory lookups; +information on existence of directories; </listitem> <listitem> @@ -1675,15 +1670,15 @@ </tag-name> <tag-desc> sets the maximum number of elements in the cache; -on cache overflow the least recently used (LRU) elements get removed; +on cache overflow the least recently used (LRU) elements are removed; </tag-desc> <tag-name> <literal>inactive</literal> </tag-name> <tag-desc> -defines a time, after which an element gets removed from the cache -if there were no accesses to it during this time; +defines a time after which an element is removed from the cache +if it has not been accessed during this time; by default, it is 60 seconds; </tag-desc> @@ -1764,8 +1759,8 @@ <para> Sets the minimum <value>number</value> of file accesses during the period configured by the <literal>inactive</literal> parameter -of the <link id="open_file_cache"/> directive, -after which a file descriptor will remain open in the cache. +of the <link id="open_file_cache"/> directive, required for a file +descriptor to remain open in the cache. </para> </directive> @@ -1800,8 +1795,8 @@ <context>server</context> <para> -This directive is made obsolete by the -<link id="server_name_in_redirect"/> directive. +This directive is obsolete. +The <link id="server_name_in_redirect"/> directive should be used instead. </para> <!-- @@ -1833,7 +1828,7 @@ </para> <para> -The use of a primary server name in redirects is controlled by +The use of the primary server name in redirects is controlled by the <link id="server_name_in_redirect"/> directive. </para> @@ -1848,9 +1843,9 @@ <context>location</context> <para> -If possible, the output of client data will be postponed until +If possible, the transmission of client data will be postponed until nginx has at least <value>size</value> bytes of data to send. -Value of zero disables postponing. +The zero value disables postponing data transmission. </para> </directive> @@ -1864,21 +1859,21 @@ <context>location</context> <para> -Sets the amount of pre-reading when working with files, in the kernel. +Sets the amount of pre-reading for the kernel when working with file. </para> <para> On Linux, the <literal>posix_fadvise(0, 0, 0, POSIX_FADV_SEQUENTIAL)</literal> -system call is used, so the <value>size</value> parameter is ignored. +system call is used, and so the <value>size</value> parameter is ignored. </para> <para> On FreeBSD, the <literal>fcntl(O_READAHEAD,</literal> <value>size</value><literal>)</literal> -system call is used, supported in FreeBSD 9.0-CURRENT. -FreeBSD 7 needs to be +system call, supported since FreeBSD 9.0-CURRENT, is used. +FreeBSD 7 has to be <link url="http://sysoev.ru/freebsd/patch.readahead.txt">patched</link>. </para> @@ -1896,7 +1891,7 @@ Enables or disables doing several redirects using the <link id="error_page"/> directive. -There is a <link id="internal">limit</link> on a number of such redirects. +The number of such redirects is <link id="internal">limited</link>. </para> </directive> @@ -1909,8 +1904,8 @@ <context>server</context> <para> -Allows to fine tune per-request memory allocations. -This directive has minimal impact on performance, +Allows accurate tuning of per-request memory allocations. +This directive has minimal impact on performance and should not generally be used. </para> @@ -1925,18 +1920,19 @@ <context>location</context> <para> -Enables or disables resetting of timed out connections. -The reset is performed as follows: before closing a socket, the +Enables or disables resetting timed out connections. +The reset is performed as follows. +Before closing a socket, the <c-def>SO_LINGER</c-def> option is set on it with a timeout value of 0. -When the socket is closed, a client is sent TCP RST, and all memory -occupied by this socket is freed. -This avoids keeping of an already closed socket with filled buffers -for a long time, in a FIN_WAIT1 state. +When the socket is closed, TCP RST is sent to the client, and all memory +occupied by this socket is released. +This helps avoid keeping an already closed socket with filled buffers +in a FIN_WAIT1 state for a long time. </para> <para> -It should be noted that timed out keep-alive connections are still +It should be noted that timed out keep-alive connections are closed normally. </para> @@ -1968,7 +1964,7 @@ starting from versions 1.3.1 and 1.2.2. </note> By default, nginx caches answers using the TTL value of a response. -An optional <literal>valid</literal> parameter allows to override it: +An optional <literal>valid</literal> parameter allows overriding it: <example> resolver 127.0.0.1 [::1]:5353 valid=30s; </example> @@ -2014,20 +2010,19 @@ root /data/w3; } </example> -“<literal>/i/top.gif</literal>” will be responded -with the file -<path>/data/w3/i/top.gif</path>. +The <path>/data/w3/i/top.gif</path> file will be sent in response to +the “<literal>/i/top.gif</literal>” request. </para> <para> -The <value>path</value> value can contain variables +The <value>path</value> value can contain variables, except <var>$document_root</var> and <var>$realpath_root</var>. </para> <para> A path to the file is constructed by merely adding a URI to the value of the <literal>root</literal> directive. -If a URI need to be modified, the +If a URI has to be modified, the <link id="alias"/> directive should be used. </para> @@ -2042,10 +2037,11 @@ <context>location</context> <para> -Allows access if <literal>all</literal> or <literal>any</literal> of the +Allows access if both (<literal>all</literal>) or at least one +(<literal>any</literal>) of the <link doc="ngx_http_access_module.xml">ngx_http_access_module</link> or <link doc="ngx_http_auth_basic_module.xml">ngx_http_auth_basic_module</link> -modules grant access. +modules allow access. </para> <para> @@ -2089,12 +2085,12 @@ <context>location</context> <para> -If set to a non-zero value, nginx will try to minimize the number -of send operations on client sockets by using either +If the directive is set to a non-zero value, nginx will try to minimize +the number of send operations on client sockets by using either <c-def>NOTE_LOWAT</c-def> flag of the -<link doc="../events.xml" id="kqueue"/> method, -or the <c-def>SO_SNDLOWAT</c-def> socket option, -with the specified <value>size</value>. +<link doc="../events.xml" id="kqueue"/> method +or the <c-def>SO_SNDLOWAT</c-def> socket option. +In both cases the specified <value>size</value> is used. </para> <para> @@ -2150,7 +2146,7 @@ <para> When set to a non-zero value, limits the amount of data that can be transferred in a single <c-func>sendfile</c-func> call. -Without the limit, one fast connection may seize the worker process. +Without the limit, one fast connection may seize the worker process entirely. </para> </directive> @@ -2162,12 +2158,12 @@ <context>http</context> <para> -Sets a configuration for the virtual server. -There is no clean separation between IP-based (based on the IP address) +Sets configuration for a virtual server. +There is no clear separation between IP-based (based on the IP address) and name-based (based on the <header>Host</header> request header field) virtual servers. Instead, the <link id="listen"/> directives describe all -addresses and ports that should accept connections for a server, and the +addresses and ports that should accept connections for the server, and the <link id="server_name"/> directive lists all server names. Example configurations are provided in the “<link doc="request_processing.xml"/>” document. @@ -2182,7 +2178,7 @@ <context>server</context> <para> -Sets names of the virtual server, for example: +Sets names of a virtual server, for example: <example> server { server_name example.com www.example.com; @@ -2196,7 +2192,7 @@ <para> Server names can include an asterisk (“<literal>*</literal>”) -to replace the first or last part of a name: +replacing the first or last part of a name: <example> server { server_name example.com *.example.com www.example.*; @@ -2206,7 +2202,7 @@ </para> <para> -The first two of the above mentioned names can be combined: +The first two of the names mentioned above can be combined in one: <example> server { server_name .example.com; @@ -2216,7 +2212,7 @@ <para> It is also possible to use regular expressions in server names, -prepending the name with a tilde (“<literal>~</literal>”): +preceeding the name with a tilde (“<literal>~</literal>”): <example> server { server_name www.example.com ~^www\d+\.example\.com$; @@ -2269,8 +2265,8 @@ </para> <para> -If the parameter equals “<var>$hostname</var>” (0.9.4), the -machine’s hostname is substituted. +If the directive’s parameter is set to “<var>$hostname</var>” (0.9.4), the +machine’s hostname is inserted. </para> <para> @@ -2281,7 +2277,7 @@ } </example> It allows this server to process requests without the <header>Host</header> -header field, instead of the default server for the given address:port pair. +header field — instead of the default server — for the given address:port pair. This is the default setting. <note> Before 0.8.48, the machine’s hostname was used by default. @@ -2289,29 +2285,29 @@ </para> <para> -When searching for a virtual server by name, -if name matches more than one of the specified variants, -e.g. both wildcard name and regular expression match, the first matching -variant will be chosen, in the following order of precedence: +During searching for a virtual server by name, +if the name matches more than one of the specified variants, +(e.g. both a wildcard name and regular expression match), the first matching +variant will be chosen, in the following order of priority: <list type="enum"> <listitem> -exact name +the exact name </listitem> <listitem> -longest wildcard name starting with an asterisk, +the longest wildcard name starting with an asterisk, e.g. “<literal>*.example.com</literal>” </listitem> <listitem> -longest wildcard name ending with an asterisk, +the longest wildcard name ending with an asterisk, e.g. “<literal>mail.*</literal>” </listitem> <listitem> -first matching regular expression -(in order of appearance in a configuration file) +the first matching regular expression +(in order of appearance in the configuration file) </listitem> </list> @@ -2336,9 +2332,9 @@ Enables or disables the use of the primary server name, specified by the <link id="server_name"/> directive, in redirects issued by nginx. -When disabled, the name from the <header>Host</header> request header field -is used. -If this field is not present, an IP address of the server is used. +When the use of the primary server name is disabled, the name from the +<header>Host</header> request header field is used. +If this field is not present, the IP address of the server is used. </para> <para> @@ -2356,7 +2352,7 @@ <para> Sets the bucket size for the server names hash tables. -Default value depends on the size of the processor’s cache line. +The default value depends on the size of the processor’s cache line. Details of setting up hash tables are provided in a separate <link doc="../hash.xml">document</link>. </para> @@ -2386,7 +2382,7 @@ <context>location</context> <para> -Enables or disables emitting of nginx version in error messages and in the +Enables or disables emitting nginx version in error messages and in the <header>Server</header> response header field. </para> @@ -2420,17 +2416,17 @@ Enables or disables the use of the <c-def>TCP_NOPUSH</c-def> socket option on FreeBSD or the <c-def>TCP_CORK</c-def> socket option on Linux. -Options are enabled only when <link id="sendfile"/> is used. -Enabling the option allows to +The options are enabled only when <link id="sendfile"/> is used. +Enabling the option allows <list type="bullet"> <listitem> -send the response header and the beginning of a file in one packet, +sending the response header and the beginning of a file in one packet, on Linux and FreeBSD 4.*; </listitem> <listitem> -send a file in full packets. +sending a file in full packets. </listitem> </list> @@ -2447,17 +2443,17 @@ <context>location</context> <para> -Checks the existence of files in the specified order, and uses +Checks the existence of files in the specified order and uses the first found file for request processing; the processing is performed in the current context. -A path to the file is constructed from the +The path to a file is constructed from the <value>file</value> parameter according to the <link id="root"/> and <link id="alias"/> directives. -It is possible to check the directory existence by specifying +It is possible to check directory’s existence by specifying a slash at the end of a name, e.g. “<literal>$uri/</literal>”. If none of the files were found, an internal redirect to the -<value>uri</value> specified by the last parameter is made. +<value>uri</value> specified in the last parameter is made. For example: <example> location /images/ { @@ -2470,7 +2466,7 @@ </example> The last parameter can also point to a named location, as shown in examples below. -As of version 0.7.51, the last parameter can also be a +Starting from version 0.7.51, the last parameter can also be a <value>code</value>: <example> location / { @@ -2480,7 +2476,7 @@ </para> <para> -Example when proxying Mongrel: +Example in proxying Mongrel: <example> location / { try_files /system/maintenance.html @@ -2594,7 +2590,7 @@ <para> Maps file name extensions to MIME types of responses. Extensions are case-insensitive. -Several extensions can map to one type, for example: +Several extensions can be mapped to one type, for example: <example> types { application/octet-stream bin exe dll; @@ -2612,7 +2608,7 @@ <para> To make a particular location emit the “<literal>application/octet-stream</literal>” -MIME type for all requests, try the following: +MIME type for all requests, the following configuration can be used: <example> location /download/ { types { } @@ -2633,7 +2629,7 @@ <para> Sets the bucket size for the types hash tables. -Default value depends on the size of the processor’s cache line. +The default value depends on the size of the processor’s cache line. Details of setting up hash tables are provided in a separate <link doc="../hash.xml">document</link>. </para> @@ -2665,15 +2661,16 @@ <para> Enables or disables the use of underscores in client request header fields. -When disabled, request header fields whose names contain underscores are -marked as invalid and are subject to the <link id="ignore_invalid_headers"/> -directive. +When the use of underscores is disabled, request header fields whose names +contain underscores are +marked as invalid and become subject to the +<link id="ignore_invalid_headers"/> directive. </para> <para> A directive can be specified on the <link id="server"/> level in a default server. -In this case, its value will cover all virtual servers +In this case, its value will apply to all virtual servers listening on the same address and port. </para> @@ -2713,12 +2710,12 @@ <section id="variables" name="Embedded Variables"> <para> -The module <literal>ngx_http_core_module</literal> supports embedded variables -with names matching those of the Apache Server. +The <literal>ngx_http_core_module</literal> module supports embedded variables +with names matching the Apache Server variables. First of all, these are variables representing client request header fields, such as <var>$http_user_agent</var>, <var>$http_cookie</var>, and so on. -It also supports other variables: +Also there are other variables: <list type="tag"> <tag-name id="var_arg_"><var>$arg_</var><value>name</value></tag-name> @@ -2820,13 +2817,13 @@ <tag-name id="var_limit_rate"><var>$limit_rate</var></tag-name> <tag-desc> -setting this variable allows for response rate limiting; +setting this variable enables response rate limiting; see <link id="limit_rate"/> </tag-desc> <tag-name id="var_msec"><var>$msec</var></tag-name> <tag-desc> -current time in seconds with a milliseconds resolution (1.3.9, 1.2.6) +current time in seconds with the milliseconds resolution (1.3.9, 1.2.6) </tag-desc> <tag-name id="var_nginx_version"><var>$nginx_version</var></tag-name> @@ -2896,11 +2893,11 @@ name of a temporary file with the request body <para> At the end of processing, the file needs to be removed. -To always write a request body to a file, +To always write the request body to a file, <link id="client_body_in_file_only"/> needs to be enabled. -When passing the name of a temporary file in a proxied request, +When the name of a temporary file is passed in a proxied request or in a request to a FastCGI server, -passing of the request body should be disabled by the +passing the request body should be disabled by the <link doc="ngx_http_proxy_module.xml" id="proxy_pass_request_body"> proxy_pass_request_body off</link> and
--- a/xml/ru/docs/http/ngx_http_core_module.xml Sat Jun 08 20:55:52 2013 +0400 +++ b/xml/ru/docs/http/ngx_http_core_module.xml Tue Aug 06 17:03:33 2013 +0400 @@ -93,9 +93,9 @@ } </example> В такой конфигурации функция <c-func>sendfile</c-func> вызывается с флагом -<c-def>SF_NODISKIO</c-def>, в результате она не блокируется на диске, а -сообщает об отсутствии данных в памяти, после чего nginx инициирует -асинхронную подгрузку данных, читая только один байт. +<c-def>SF_NODISKIO</c-def>, в результате чего она не блокируется на диске, а +сообщает об отсутствии данных в памяти. +После этого nginx инициирует асинхронную подгрузку данных, читая один байт. При этом ядро FreeBSD подгружает в память первые 128K байт файла, однако при последующих чтениях файл подгружается частями только по 16K. Изменить это можно с помощью директивы @@ -103,8 +103,8 @@ </para> <para> -В Linux AIO можно использовать только начиная с версии ядра 2.6.22, и, -кроме того, ещё необходимо дополнительно включать +В Linux AIO можно использовать только начиная с версии ядра 2.6.22. +Кроме того, необходимо также дополнительно включить <link id="directio"/>, иначе чтение будет блокирующимся: <example> @@ -117,11 +117,11 @@ </para> <para> -Поскольку +В Linux <link id="directio"/> -в Linux можно использовать только для чтения блоков, выравненных -на границу 512 байт (или 4К для XFS), то невыравненный конец файла -будет читаться блокированно. +можно использовать только для чтения блоков, выравненных +на границу 512 байт (или 4К для XFS). +Невыравненный конец файла будет читаться блокированно. То же относится к запросам с указанием диапазона запрашиваемых байт (byte-range requests) и к запросам FLV не с начала файла: чтение невыравненных начала и конца ответа будет блокирующимся. @@ -295,7 +295,7 @@ <example> client_body_temp_path /spool/nginx/client_temp 1 2; </example> -временный файл будет следующего вида: +путь к временному файлу будет следующего вида: <example> /spool/nginx/client_temp/7/45/00000123457 </example> @@ -390,10 +390,10 @@ <context>server</context> <para> -Позволяет производить точную настройку выделений памяти +Позволяет производить точную настройку выделения памяти под конкретные соединения. Эта директива не оказывает существенного влияния на -производительность и её не следует использовать. +производительность, и её не следует использовать. </para> </directive> @@ -534,7 +534,7 @@ требуют дополнительных затрат на обработку. <note> На системах, не поддерживающих операцию открытия каталогов только для поиска, -использование этих параметров требует, чтобы рабочие процессы +для использования этих параметров требуется, чтобы рабочие процессы имели право читать все проверяемые каталоги. </note> </para> @@ -566,7 +566,7 @@ <para> Задаёт URI, который будет показываться для указанных ошибок. Директивы <literal>error_page</literal> наследуются с предыдущего уровня -при условии, что на данном уровне не описаны свои директивы +при условии, что на данном уровне не заданы свои директивы <literal>error_page</literal>. В значении <literal>uri</literal> можно использовать переменные. </para> @@ -830,7 +830,7 @@ <para> Задаёт максимальное число запросов, которые можно сделать по одному keep-alive соединению. -После того, как будет сделано максимальное число запросов, +После того, как сделано максимальное число запросов, соединение закрывается. </para> @@ -947,7 +947,7 @@ <!-- Чем меньше скорость, тем более аккуратным будет ограничение. --> -Ограничение устанавливается на запрос, поэтому если клиент одновременно +Ограничение устанавливается на запрос, поэтому, если клиент одновременно откроет два соединения, суммарная скорость будет вдвое выше заданного ограничения. </para> @@ -1040,7 +1040,8 @@ <para> Со значением “<literal>off</literal>” nginx не будет ждать поступления дополнительных данных и сразу же закроет соединение. -Это нарушает протокол, поэтому не следует это использовать без нужды. +Это поведение нарушает протокол и поэтому не должно использоваться без +необходимости. </para> </directive> @@ -1076,7 +1077,8 @@ Если действует <link id="lingering_close"/>, эта директива задаёт максимальное время ожидания поступления дополнительных данных от клиента. Если в течение этого времени данные не были получены, соединение закрывается. -Иначе данные читаются и игнорируются, затем nginx снова ждёт поступления данных. +В противном случае данные читаются и игнорируются, и nginx снова +ждёт поступления данных. Цикл “ждать-читать-игнорировать” повторяется, но не дольше чем задано директивой <link id="lingering_time"/>. </para> @@ -1132,8 +1134,8 @@ Задаёт <value>адрес</value> и <value>порт</value> для IP или <value>путь</value> для UNIX-сокета, на которых сервер будет принимать запросы. -Можно указать только <value>адрес</value> -или только <value>порт</value>. +Можно указать <value>адрес</value> и <value>порт</value>, +либо только <value>адрес</value> или только <value>порт</value>. Кроме того, <value>адрес</value> может быть именем хоста, например: <example> listen 127.0.0.1:8000; @@ -1158,8 +1160,8 @@ </para> <para> -Если директива не указана, то используется либо <literal>*:80</literal> -(если nginx работает с привилегиями суперпользователя), +Если директива не указана, то используется либо <literal>*:80</literal>, +если nginx работает с привилегиями суперпользователя, либо <literal>*:8000</literal>. </para> @@ -1177,8 +1179,8 @@ </para> <para> -Параметр <literal>ssl</literal>(0.7.14) позволяет указать, что все соединения, -принимаемые на этом порту, должны работать в режиме SSL. +Параметр <literal>ssl</literal> (0.7.14) указывает на то, что все соединения, +принимаемые на данном порту, должны работать в режиме SSL. Это позволяет задать компактную <link doc="configuring_https_servers.xml" id="single_http_https_server">конфигурацию</link> для сервера, работающего сразу в двух режимах — HTTP и HTTPS. @@ -1250,7 +1252,7 @@ который включается для фильтрации входящих соединений перед передачей их в <c-func>accept</c-func>. Работает только на FreeBSD и NetBSD 5.0+. -Можно использовать два фильтра — +Можно использовать два фильтра: <link url="http://man.freebsd.org/accf_data">dataready</link> и <link url="http://man.freebsd.org/accf_http">httpready</link>. @@ -1271,7 +1273,7 @@ указывает, что для данной пары <value>адрес</value>:<value>порт</value> нужно делать <c-func>bind</c-func> отдельно. -Дело в том, что если описаны несколько директив <literal>listen</literal> +Это нужно потому, что если описаны несколько директив <literal>listen</literal> с одинаковым портом, но разными адресами, и одна из директив <literal>listen</literal> слушает на всех адресах для данного порта (<literal>*:</literal><value>порт</value>), то nginx сделает @@ -1367,7 +1369,7 @@ Для сопоставления используется URI запроса в нормализованном виде, после декодирования текста, заданного в виде “<literal>%XX</literal>”, преобразования относительных элементов пути “<literal>.</literal>” и -“<literal>..</literal>” в реальные, и возможной +“<literal>..</literal>” в реальные и возможной <link id="merge_slashes">замены</link> двух и более подряд идущих слэшей на один. </para> @@ -1379,25 +1381,26 @@ либо с модификатором “<literal>~</literal>” (с учётом регистра). Чтобы найти location, соответствующий запросу, вначале проверяются location’ы, заданные префиксными строками (префиксные location’ы). -Среди них ищется максимальное совпадение. +Среди них ищется location с совпадающим префиксом +максимальной длины и запоминается. Затем проверяются регулярные выражения, в порядке их следования в конфигурационном файле. Проверка регулярных выражений прекращается после первого же совпадения, и используется соответствующая конфигурация. Если совпадение с регулярным выражением не найдено, то используется -конфигурация максимально совпавшего префиксного location’а. +конфигурация запомненного ранее префиксного location’а. </para> <para> -location’ы могут быть вложенными, с некоторыми исключениями, -о которых говорится ниже. +Блоки <literal>location</literal> могут быть вложенными, +с некоторыми исключениями, о которых говорится ниже. </para> <para> Для операционных систем, нечувствительных к регистру символов, таких как Mac OS X и Cygwin, сравнение с префиксными строками производится без учёта регистра (0.7.7). -Однако, сравнение ограничено только однобайтными locale’ями. +Однако сравнение ограничено только однобайтными locale’ями. </para> <para> @@ -1406,7 +1409,7 @@ </para> <para> -Если у максимального совпавшего префиксного location’а указан модификатор +Если у совпавшего префиксного location’а максимальной длины указан модификатор “<literal>^~</literal>”, то регулярные выражения не проверяются. </para> @@ -1543,7 +1546,7 @@ указанием диапазона запрашиваемых байт (byte-range requests). Запросы, превышающие указанное ограничение, обрабатываются как если бы они не содержали указания диапазонов. -По умолчанию ограничения нет. +По умолчанию число диапазонов не ограничено. Значение 0 полностью запрещает поддержку диапазонов. </para> @@ -1579,7 +1582,7 @@ Запрет преобразования может понадобиться, если в URI используются имена, закодированные методом base64, в котором задействован символ “<literal>/</literal>”. -Однако по соображениям безопасности лучше избегать отключения преобразования. +Однако из соображений безопасности лучше избегать отключения преобразования. </para> <para> @@ -1752,8 +1755,8 @@ <para> Задаёт минимальное <value>число</value> обращений к файлу в течение времени, заданного параметром <literal>inactive</literal> -директивы <link id="open_file_cache"/>, после которого дескриптор -файла будет оставаться открытым в кэше. +директивы <link id="open_file_cache"/>, необходимых для того, чтобы дескриптор +файла оставался открытым в кэше. </para> </directive> @@ -1788,8 +1791,8 @@ <context>server</context> <para> -Директива устарела, вместо неё следует использовать директиву -<link id="server_name_in_redirect"/>. +Директива устарела. +Вместо неё следует использовать директиву <link id="server_name_in_redirect"/>. </para> <!-- @@ -1898,7 +1901,7 @@ Позволяет производить точную настройку выделений памяти под конкретные запросы. Эта директива не оказывает существенного влияния на -производительность и её не следует использовать. +производительность, и её не следует использовать. </para> </directive> @@ -1913,11 +1916,11 @@ <para> Разрешает или запрещает сброс соединений по таймауту. -Сброс делается следующим образом — перед закрытием сокета для него -ставится параметр +Сброс делается следующим образом. +Перед закрытием сокета для него задаётся параметр <c-def>SO_LINGER</c-def> с таймаутом 0. -После чего при закрытии сокета клиенту отсылается TCP RST, а вся память, +После этого при закрытии сокета клиенту отсылается TCP RST, а вся память, связанная с этим сокетом, освобождается. Это позволяет избежать длительного нахождения уже закрытого сокета в состоянии FIN_WAIT1 с заполненными буферами. @@ -2078,12 +2081,12 @@ <context>location</context> <para> -При установке в ненулевое значение nginx будет пытаться минимизировать -число операций отправки на клиентских сокетах либо при помощи флага -<c-def>NOTE_LOWAT</c-def> метода +При установке этой директивы в ненулевое значение nginx будет пытаться +минимизировать число операций отправки на клиентских сокетах либо при +помощи флага <c-def>NOTE_LOWAT</c-def> метода <link doc="../events.xml" id="kqueue"/>, -либо при помощи параметра сокета <c-def>SO_SNDLOWAT</c-def>, -с указанным размером. +либо при помощи параметра сокета <c-def>SO_SNDLOWAT</c-def>. +В обоих случаях будет использован указанный <value>размер</value>. </para> <para> @@ -2258,7 +2261,7 @@ </para> <para> -Если параметр равен “<var>$hostname</var>” (0.9.4), то +Если параметр директивы установлен в “<var>$hostname</var>” (0.9.4), то подставляется имя хоста (hostname) машины. </para> @@ -2325,8 +2328,8 @@ Разрешает или запрещает использовать в перенаправлениях, выдаваемых nginx’ом, основное имя сервера, задаваемое директивой <link id="server_name"/>. -Если запрещено, то используется имя, указанное в поле <header>Host</header> -заголовка запроса. +Если использование основного имени сервера запрещено, то используется имя, +указанное в поле <header>Host</header> заголовка запроса. Если же этого поля нет, то используется IP-адрес сервера. </para> @@ -2457,7 +2460,7 @@ </example> Последний параметр может также указывать на именованный location, как в примерах ниже. -С версии 0.7.51 последний параметр может также быть кодом: +С версии 0.7.51 последний параметр может также быть <value>кодом</value>: <example> location / { try_files $uri $uri/index.html $uri.html =404; @@ -2652,7 +2655,8 @@ <para> Разрешает или запрещает использование символов подчёркивания в полях заголовка запроса клиента. -Если запрещено, поля заголовка запроса, в чьих именах есть подчёркивания, +Если использование символов подчёркивания запрещено, поля заголовка запроса, в +именах которых есть подчёркивания, помечаются как недопустимые и подпадают под действие директивы <link id="ignore_invalid_headers"/>. </para> @@ -2880,7 +2884,7 @@ <tag-desc> имя временного файла, в котором хранится тело запроса <para> -По завершению обработки файл необходимо удалить. +По завершении обработки файл необходимо удалить. Для того, чтобы тело запроса всегда записывалось в файл, следует включить <link id="client_body_in_file_only"/>. При передаче имени временного файла в проксированном запросе