annotate xml/en/docs/http/ngx_http_core_module.xml @ 176:0883fc5aabc9

Documented the "keepalive_disable" and "send_lowat" directives.
author Ruslan Ermilov <ru@nginx.com>
date Wed, 09 Nov 2011 10:51:40 +0000
parents 3381ae6a93e4
children 05e7496801ec
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1 <?xml version="1.0"?>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
4
89
f451dc5c5c82 Module names corrected.
Ruslan Ermilov <ru@nginx.com>
parents: 88
diff changeset
5 <module name="Module ngx_http_core_module"
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
6 link="/en/docs/http/ngx_http_core_module.html"
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
7 lang="en">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
8
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
9 <section id="directives" name="Directives">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
10
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
11 <directive name="aio">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
12 <syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
13 <value>on</value> |
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
14 <value>off</value> |
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
15 <value>sendfile</value>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
16 </syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
17 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
18 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
19 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
20 <context>location</context>
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
21 <appeared-in>0.8.11</appeared-in>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
22
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
23 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
24 Enables or disables the use of asynchronous file I/O (AIO)
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
25 on FreeBSD and Linux.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
26 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
27
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
28 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
29 On FreeBSD, AIO is usable starting from FreeBSD&nbsp;4.3.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
30 AIO can either be linked statically into a kernel:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
31 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
32 options VFS_AIO
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
33 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
34 or loaded dynamically as a kernel loadable module:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
35 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
36 kldload aio
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
37 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
38 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
39
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
40 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
41 In FreeBSD versions 5 and 6, enabling AIO statically, or dynamically
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
42 when booting the kernel, will cause the entire networking subsystem
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
43 to use the Giant lock that can impact overall performance negatively.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
44 This limitation has been removed in FreeBSD&nbsp;6.4-STABLE in 2009, and in
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
45 FreeBSD&nbsp;7.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
46 However, starting from FreeBSD&nbsp;5.3 it is possible to enable AIO
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
47 without the penalty of running the networking subsystem under a
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
48 Giant lock&mdash;for this to work, the AIO module needs to be loaded
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
49 after the kernel has booted.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
50 In this case, the following message will appear in
148
682163f2b298 Unified article/path and module/pathname into a single "path".
Ruslan Ermilov <ru@nginx.com>
parents: 147
diff changeset
51 <path>/var/log/messages</path>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
52 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
53 WARNING: Network stack Giant-free, but aio requires Giant.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
54 Consider adding 'options NET_WITH_GIANT' or setting debug.mpsafenet=0
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
55 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
56 and can safely be ignored.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
57 <note>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
58 The requirement to use the Giant lock with AIO is related to the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
59 fact that FreeBSD supports asynchronous calls
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
60 <c-func>aio_read</c-func>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
61 and
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
62 <c-func>aio_write</c-func>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
63 when working with sockets.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
64 However, since nginx only uses AIO for disk I/O, no problems should arise.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
65 </note>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
66 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
67
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
68 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
69 For AIO to work,
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
70 <link id="sendfile"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
71 needs to be disabled:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
72 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
73 location /video/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
74 sendfile off;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
75 aio on;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
76 output_buffers 1 64k;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
77 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
78 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
79 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
80
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
81 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
82 In addition, starting from FreeBSD&nbsp;5.2.1 and nginx&nbsp;0.8.12, AIO can
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
83 also be used to pre-load data for <c-func>sendfile</c-func>:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
84 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
85 location /video/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
86 sendfile on;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
87 tcp_nopush on;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
88 aio sendfile;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
89 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
90 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
91 In this configuration, <c-func>sendfile</c-func> is called with
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
92 the <c-def>SF_NODISKIO</c-def> flag which causes it not to
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
93 block on disk I/O and instead report back when the data are not in
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
94 memory; nginx then initiates an asynchronous data load by reading
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
95 one byte. The FreeBSD kernel then loads the first 128K bytes
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
96 of a file into memory, however next reads will only load data
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
97 in 16K chunks. This can be tuned using the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
98 <link id="read_ahead"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
99 directive.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
100 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
101
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
102 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
103 On Linux, AIO is usable starting from kernel version 2.6.22;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
104 plus, it is also necessary to enable
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
105 <link id="directio"/>,
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
106 otherwise reading will be blocking:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
107 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
108 location /video/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
109 aio on;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
110 directio 512;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
111 output_buffers 1 128k;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
112 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
113 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
114 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
115
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
116 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
117 On Linux,
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
118 <link id="directio"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
119 can only be used for reading blocks that are aligned on 512-byte
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
120 boundaries (or 4K for XFS).
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
121 Reading of unaligned file's end is still made in blocking mode.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
122 The same holds true for byte range requests, and for FLV requests
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
123 not from the beginning of a file: reading of unaligned data at the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
124 beginning and end of a file will be blocking.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
125 There is no need to turn off
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
126 <link id="sendfile"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
127 explicitly as it is turned off automatically when
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
128 <link id="directio"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
129 is used.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
130 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
131
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
132 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
133
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
134
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
135 <directive name="alias">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
136 <syntax><argument>path</argument></syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
137 <default/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
138 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
139
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
140 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
141 Defines a replacement for the specified location.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
142 For example, with the following configuration
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
143 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
144 location /i/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
145 alias /data/w3/images/;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
146 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
147 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
148 the request of
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
149 “<code>/i/top.gif</code>” will be responded
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
150 with the file
148
682163f2b298 Unified article/path and module/pathname into a single "path".
Ruslan Ermilov <ru@nginx.com>
parents: 147
diff changeset
151 <path>/data/w3/images/top.gif</path>.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
152 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
153
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
154 <para>
65
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
155 The <argument>path</argument> value can contain variables
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
156 except <var>$document_root</var> and <var>$realpath_root</var>.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
157 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
158
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
159 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
160 If <code>alias</code> is used inside a location defined
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
161 with a regular expression then such regular expression should
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
162 contain captures and <code>alias</code> should refer to
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
163 these captures (0.7.40), for example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
164 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
165 location ~ ^/users/(.+\.(?:gif|jpe?g|png))$ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
166 alias /data/w3/images/$1;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
167 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
168 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
169 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
170
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
171 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
172 When location matches the last part of the directive's value:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
173 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
174 location /images/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
175 alias /data/w3/images/;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
176 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
177 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
178 it is better to use the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
179 <link id="root"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
180 directive instead:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
181 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
182 location /images/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
183 root /data/w3;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
184 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
185 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
186 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
187
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
188 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
189
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
190
162
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
191 <directive name="chunked_transfer_encoding">
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
192 <syntax><value>on</value> | <value>off</value></syntax>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
193 <default>on</default>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
194 <context>http</context>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
195 <context>server</context>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
196 <context>location</context>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
197
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
198 <para>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
199 Allows disabling chunked transfer encoding in HTTP/1.1.
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
200 It may come in handy when using a software failing to support
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
201 chunked encoding though the standard requires it.
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
202 </para>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
203
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
204 </directive>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
205
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
206
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
207 <directive name="client_body_buffer_size">
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
208
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
209 <syntax><argument>size</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
210 <default>8k|16k</default>
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
211 <context>http</context>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
212 <context>server</context>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
213 <context>location</context>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
214
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
215 <para>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
216 Sets buffer size for reading client request body.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
217 In case request body is larger than the buffer,
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
218 the whole body or only its part is written to a
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
219 <link id="client_body_temp_path">temporary file</link>.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
220 By default, buffer size is equal to two memory pages.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
221 This is 8K on x86, other 32-bit platforms, and x86-64.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
222 It is usually 16K on other 64-bit platforms.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
223 </para>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
224
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
225 </directive>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
226
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
227
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
228 <directive name="client_body_in_file_only">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
229 <syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
230 <value>on</value> |
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
231 <value>clean</value> |
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
232 <value>off</value>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
233 </syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
234 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
235 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
236 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
237 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
238
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
239 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
240 Determines whether nginx should save the entire client request body
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
241 into a file.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
242 This directive can be used during debugging, or when using the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
243 <var>$request_body_file</var>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
244 variable, or the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
245 <link doc="ngx_http_perl_module.xml" id="methods">$r->request_body_file</link>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
246 method of the module
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
247 <link doc="ngx_http_perl_module.xml">ngx_http_perl_module</link>.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
248 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
249
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
250 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
251 When set to the value <value>on</value>, temporary files are not
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
252 removed after request processing.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
253 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
254
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
255 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
256 The value <value>clean</value> will cause the temporary files
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
257 left after request processing to be removed.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
258 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
259
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
260 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
261
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
262
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
263 <directive name="client_body_in_single_buffer">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
264 <syntax><value>on</value> | <value>off</value>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
265 </syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
266 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
267 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
268 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
269 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
270
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
271 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
272 Determines whether nginx should save the entire client request body
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
273 in a single buffer.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
274 The directive is recommended when using the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
275 <var>$request_body</var>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
276 variable, to save the number of copy operations involved.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
277 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
278
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
279 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
280
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
281
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
282 <directive name="client_body_temp_path">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
283 <syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
284 <argument>path</argument>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
285 [<argument>level1</argument>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
286 [<argument>level2</argument>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
287 [<argument>level3</argument>]]]
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
288 </syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
289 <default>client_body_temp</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
290 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
291 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
292 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
293
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
294 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
295 Defines a directory for storing temporary files holding client request bodies.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
296 Up to three-level subdirectory hierarchy can be used underneath the specified
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
297 directory.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
298 For example, in the following configuration
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
299 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
300 client_body_temp_path /spool/nginx/client_temp 1 2;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
301 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
302 a temporary file might look like this:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
303 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
304 /spool/nginx/client_temp/7/45/00000123457
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
305 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
306 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
307
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
308 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
309
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
310
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
311 <directive name="client_body_timeout">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
312 <syntax><argument>time</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
313 <default>60s</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
314 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
315 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
316 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
317
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
318 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
319 Defines a timeout for reading client request body.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
320 A timeout is only set between two successive read operations,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
321 not for the transmission of the whole request body.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
322 If a client does not transmit anything within this time,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
323 the client error
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
324 <http-status code="408" text="Request Time-out"/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
325 is returned.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
326 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
327
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
328 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
329
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
330
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
331 <directive name="client_header_buffer_size">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
332 <syntax><argument>size</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
333 <default>1k</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
334 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
335 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
336
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
337 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
338 Sets buffer size for reading client request header.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
339 For most requests, a buffer of 1K bytes is enough.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
340 However, if a request includes long cookies, or comes from a WAP client,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
341 it may not fit into 1K.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
342 If a request line, or a request header field do not fit entirely into
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
343 this buffer then larger buffers are allocated, configured by the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
344 <link id="large_client_header_buffers"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
345 directive.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
346 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
347
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
348 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
349
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
350
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
351 <directive name="client_header_timeout">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
352 <syntax><argument>time</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
353 <default>60s</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
354 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
355 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
356
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
357 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
358 Defines a timeout for reading client request header.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
359 If a client does not transmit the entire header within this time,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
360 the client error
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
361 <http-status code="408" text="Request Time-out"/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
362 is returned.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
363 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
364
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
365 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
366
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
367
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
368 <directive name="client_max_body_size">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
369 <syntax><argument>size</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
370 <default>1m</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
371 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
372 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
373 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
374
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
375 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
376 Sets the maximum allowed size of the client request body,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
377 specified in the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
378 <header>Content-Length</header>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
379 request header field.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
380 If it exceeds the configured value, the client error
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
381 <http-status code="413" text="Request Entity Too Large"/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
382 is returned.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
383 Please be aware that
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
384 <link doc="/web/upload.xml">browsers cannot correctly display
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
385 this error</link>.
65
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
386 Setting <argument>size</argument> to 0 disables client
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
387 request body size checking.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
388 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
389
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
390 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
391
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
392
161
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
393 <directive name="connection_pool_size">
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
394 <syntax><argument>size</argument></syntax>
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
395 <default>256</default>
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
396 <context>http</context>
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
397 <context>server</context>
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
398
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
399 <para>
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
400 Allows to fine tune per-connection memory allocations.
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
401 This directive has minimal impact on performance,
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
402 and should not generally be used.
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
403 </para>
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
404
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
405 </directive>
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
406
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
407
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
408 <directive name="default_type">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
409 <syntax><argument>mime-type</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
410 <default>text/plain</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
411 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
412 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
413 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
414
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
415 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
416 Defines a default MIME-type of a response.
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
417 See also the <link id="types"/> directive.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
418 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
419
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
420 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
421
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
422
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
423 <directive name="directio">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
424 <syntax><argument>size</argument> | <value>off</value></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
425 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
426 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
427 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
428 <context>location</context>
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
429 <appeared-in>0.7.7</appeared-in>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
430
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
431 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
432 Enables the use of
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
433 the <c-def>O_DIRECT</c-def> flag (FreeBSD, Linux),
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
434 the <c-def>F_NOCACHE</c-def> flag (Mac OS X),
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
435 or the <c-func>directio</c-func> function (Solaris),
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
436 when reading files that are larger than the specified <argument>size</argument>.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
437 It automatically disables (0.7.15) the use of
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
438 <link id="sendfile"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
439 for a given request.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
440 It could be useful for serving large files:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
441 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
442 directio 4m;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
443 </example>
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
444 or when using <link id="aio"/> on Linux.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
445 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
446
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
447 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
448
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
449
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
450 <directive name="directio_alignment">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
451 <syntax><argument>size</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
452 <default>512</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
453 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
454 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
455 <context>location</context>
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
456 <appeared-in>0.8.11</appeared-in>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
457
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
458 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
459 Sets an alignment for
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
460 <link id="directio"/>.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
461 In most cases, a 512-byte alignment is enough, however, when
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
462 using XFS under Linux, it needs to be increased to 4K.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
463 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
464
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
465 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
466
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
467
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
468 <directive name="error_page">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
469 <syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
470 <argument>code</argument> ...
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
471 [<value>=</value>[<argument>response</argument>]]
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
472 <argument>uri</argument>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
473 </syntax>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
474 <default/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
475 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
476 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
477 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
478 <context>if in location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
479
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
480 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
481 Defines the URI that will be shown for the specified errors.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
482 These directives are inherited from the previous level if and
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
483 only if there are no
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
484 <code>error_page</code>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
485 directives on
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
486 the current level.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
487 A URI value can contain variables.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
488 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
489
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
490 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
491 Example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
492 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
493 error_page 404 /404.html;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
494 error_page 502 503 504 /50x.html;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
495 error_page 403 http://example.com/forbidden.html;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
496 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
497 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
498
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
499 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
500 Furthermore, it is possible to change the response code to another, for example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
501 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
502 error_page 404 =200 /empty.gif;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
503 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
504 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
505
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
506 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
507 If an error response is processed by a proxied server, or a FastCGI server,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
508 and the server may return different response codes (e.g., 200, 302, 401
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
509 or 404), it is possible to respond with a returned code:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
510 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
511 error_page 404 = /404.php;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
512 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
513 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
514
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
515 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
516 If there is no need to change URI during redirection it is possible to redirect
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
517 error processing into a named location:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
518 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
519 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
520 error_page 404 = @fallback;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
521 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
522
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
523 location @fallback {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
524 proxy_pass http://backend;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
525 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
526 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
527 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
528
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
529 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
530
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
531
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
532 <directive name="if_modified_since">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
533 <syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
534 <value>off</value> |
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
535 <value>exact</value> |
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
536 <value>before</value>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
537 </syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
538 <default>exact</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
539 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
540 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
541 <context>location</context>
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
542 <appeared-in>0.7.24</appeared-in>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
543
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
544 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
545 Specifies how to compare modification time of a response
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
546 with the time in the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
547 <header>If-Modified-Since</header>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
548 request header:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
549
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
550 <list type="tag">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
551
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
552 <tag-name><value>off</value></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
553 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
554 the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
555 <header>If-Modified-Since</header> request header is ignored (0.7.34);
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
556 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
557
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
558 <tag-name><value>exact</value></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
559 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
560 exact match;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
561 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
562
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
563 <tag-name><value>before</value></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
564 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
565 modification time of a response is
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
566 less than or equal to the time in the <header>If-Modified-Since</header>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
567 request header.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
568 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
569
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
570 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
571 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
572
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
573 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
574
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
575
152
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
576 <directive name="ignore_invalid_headers">
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
577 <syntax><value>on</value> | <value>off</value></syntax>
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
578 <default>on</default>
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
579 <context>http</context>
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
580 <context>server</context>
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
581
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
582 <para>
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
583 Controls whether headers with invalid names should be ignored.
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
584 Valid header names consist of letters, digits, hyphens, and possibly
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
585 underscores (as controlled by the <link id="underscores_in_headers"/>
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
586 directive).
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
587 </para>
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
588
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
589 </directive>
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
590
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
591
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
592 <directive name="internal">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
593 <syntax/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
594 <default/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
595 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
596
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
597 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
598 Specifies that a given location can only be used for internal requests.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
599 For external requests, the client error
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
600 <http-status code="404" text="Not Found"/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
601 is returned.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
602 Internal requests are the following:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
603
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
604 <list type="bullet">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
605
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
606 <listitem>
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
607 requests redirected by the <link id="error_page"/> directive;
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
608 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
609
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
610 <listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
611 subrequests formed by the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
612 <command>include virtual</command>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
613 command of the module
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
614 <link doc="ngx_http_ssi_module.xml">ngx_http_ssi_module</link>;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
615 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
616
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
617 <listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
618 requests changed by the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
619 <link doc="ngx_http_rewrite_module.xml" id="rewrite"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
620 directive of the module
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
621 <link doc="ngx_http_rewrite_module.xml">ngx_http_rewrite_module</link>.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
622 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
623
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
624 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
625 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
626
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
627 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
628 Example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
629 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
630 error_page 404 /404.html;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
631
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
632 location /404.html {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
633 internal;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
634 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
635 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
636 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
637
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
638 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
639
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
640
176
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
641 <directive name="keepalive_disable">
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
642 <syntax><value>none</value> | <argument>browser</argument> ...</syntax>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
643 <default>msie6 safari</default>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
644 <context>http</context>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
645 <context>server</context>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
646 <context>location</context>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
647
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
648 <para>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
649 Disables keep-alive connections with misbehaving browsers.
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
650 The <argument>browser</argument> arguments specify which
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
651 browsers will be affected.
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
652 The value <value>msie6</value> disables keep-alive connections
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
653 with some old versions of MSIE, after seeing a POST request.
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
654 The value <value>safari</value> disables keep-alive connections
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
655 with Safari browsers.
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
656 The value <value>none</value> enables keep-alive connections
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
657 with all browsers.
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
658 </para>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
659
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
660 </directive>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
661
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
662
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
663 <directive name="keepalive_requests">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
664 <syntax><argument>number</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
665 <default>100</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
666 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
667 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
668 <context>location</context>
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
669 <appeared-in>0.8.0</appeared-in>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
670
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
671 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
672 Sets the maximum number of requests that can be
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
673 made through one keep-alive connection.
65
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
674 After this many requests are made, the connection is closed.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
675 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
676
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
677 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
678
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
679
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
680 <directive name="keepalive_timeout">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
681 <syntax>
65
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
682 <argument>timeout</argument>
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
683 [<argument>header_timeout</argument>]
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
684 </syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
685 <default>75s</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
686 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
687 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
688 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
689
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
690 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
691 The first argument sets a timeout during which a keep-alive
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
692 client connection will stay open on the server side.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
693 The optional second argument sets a value in the
140
b9e5155d8f5d Removed excessive quotes.
Ruslan Ermilov <ru@nginx.com>
parents: 108
diff changeset
694 <header>Keep-Alive: timeout=<argument>time</argument></header>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
695 response header.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
696 Two arguments may differ.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
697 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
698
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
699 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
700 The
140
b9e5155d8f5d Removed excessive quotes.
Ruslan Ermilov <ru@nginx.com>
parents: 108
diff changeset
701 <header>Keep-Alive: timeout=</header>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
702 is understood by Mozilla and Konqueror.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
703 MSIE will close keep-alive connection in about 60 seconds.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
704 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
705
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
706 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
707
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
708
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
709 <directive name="large_client_header_buffers">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
710 <syntax><argument>number size</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
711 <default>4 8k</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
712 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
713 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
714
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
715 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
716 Sets the maximum <argument>number</argument> and <argument>size</argument> of
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
717 buffers used when reading large client request headers.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
718 A request line cannot exceed the size of one buffer, or the client error
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
719 <http-status code="414" text="Request-URI Too Large"/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
720 is returned.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
721 A request header field cannot exceed the size of one buffer as well, or the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
722 client error
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
723 <http-status code="400" text="Bad Request"/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
724 is returned.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
725 Buffers are allocated only on demand.
65
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
726 By default, the buffer size is equal to 8K bytes.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
727 If after the end of request processing a connection is transitioned
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
728 into the keep-alive state, these buffers are freed.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
729 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
730
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
731 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
732
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
733
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
734 <directive name="limit_except">
108
72524ae53106 Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents: 106
diff changeset
735 <syntax block="yes"><argument>method</argument> ...</syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
736 <default/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
737 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
738
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
739 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
740 Limits allowed HTTP methods inside a location.
65
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
741 The <argument>method</argument> argument can be one of the following:
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
742 <value>GET</value>,
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
743 <value>HEAD</value>,
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
744 <value>POST</value>,
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
745 <value>PUT</value>,
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
746 <value>DELETE</value>,
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
747 <value>MKCOL</value>,
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
748 <value>COPY</value>,
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
749 <value>MOVE</value>,
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
750 <value>OPTIONS</value>,
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
751 <value>PROPFIND</value>,
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
752 <value>PROPPATCH</value>,
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
753 <value>LOCK</value>,
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
754 <value>UNLOCK</value>,
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
755 or
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
756 <value>PATCH</value>.
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
757 Allowing the <value>GET</value> method also allows the
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
758 <value>HEAD</value> method.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
759 Access to other methods can be limited using the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
760 <link doc="ngx_http_access_module.xml">ngx_http_access_module</link>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
761 and
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
762 <link doc="ngx_http_auth_basic_module.xml">ngx_http_auth_basic_module</link>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
763 modules directives:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
764 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
765 limit_except GET {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
766 allow 192.168.1.0/32;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
767 deny all;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
768 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
769 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
770 Please note that this will limit access to all methods
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
771 <emphasis>except</emphasis> GET and HEAD.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
772 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
773
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
774 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
775
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
776
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
777 <directive name="limit_rate">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
778 <syntax><argument>rate</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
779 <default>0</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
780 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
781 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
782 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
783 <context>if in location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
784
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
785 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
786 Rate limits the transmission of a response to a client.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
787 The <argument>rate</argument> is specified in bytes per second.
65
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
788 Value 0 (the default) disables rate limiting.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
789 <!--
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
790 The smaller the rate, the more accurate will be the limitation.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
791 -->
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
792 The limit is per connection, so if a single client opens 2 connections,
65
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
793 an overall rate will be 2x more than specified by this directive.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
794 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
795
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
796 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
797 This directive is not applicable if one wants to rate limit
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
798 a group of clients on the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
799 <link id="server"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
800 level.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
801 If that is the case, the desired limit can be specified in the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
802 <var>$limit_rate</var>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
803 variable:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
804 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
805 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
806
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
807 if ($slow) {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
808 set $limit_rate 4k;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
809 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
810
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
811 ...
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
812 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
813 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
814 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
815
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
816 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
817
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
818
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
819 <directive name="limit_rate_after">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
820 <syntax><argument>size</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
821 <default>0</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
822 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
823 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
824 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
825 <context>if in location</context>
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
826 <appeared-in>0.8.0</appeared-in>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
827
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
828 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
829 Sets the initial amount after which the further transmission
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
830 of a response to a client will be rate limited.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
831 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
832
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
833 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
834 Example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
835 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
836 location /flv/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
837 flv;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
838 limit_rate_after 500k;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
839 limit_rate 50k;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
840 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
841 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
842 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
843
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
844 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
845
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
846
172
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
847 <directive name="lingering_close">
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
848 <syntax><value>off</value> | <value>on</value> | <value>always</value></syntax>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
849 <default>on</default>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
850 <context>http</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
851 <context>server</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
852 <context>location</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
853 <appeared-in>1.1.0</appeared-in>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
854 <appeared-in>1.0.6</appeared-in>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
855
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
856 <para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
857 Controls how nginx closes client connections.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
858 </para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
859
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
860 <para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
861 The default value “<value>on</value>” instructs nginx to
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
862 <link id="lingering_timeout">wait for</link> and
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
863 <link id="lingering_time">process</link> additional data from a client
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
864 before fully closing a connection, but only
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
865 if heuristics suggests that a client may be sending more data.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
866 </para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
867
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
868 <para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
869 The value “<value>always</value>” will cause nginx to unconditionally
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
870 wait for and process additional client data.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
871 </para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
872
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
873 <para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
874 The value “<value>off</value>” tells nginx to never wait for
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
875 more data and close the connection immediately.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
876 This breaks the protocol and should not be used under normal circumstances.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
877 </para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
878
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
879 </directive>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
880
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
881
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
882 <directive name="lingering_time">
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
883 <syntax><argument>time</argument></syntax>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
884 <default>30s</default>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
885 <context>http</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
886 <context>server</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
887 <context>location</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
888
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
889 <para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
890 When <link id="lingering_close"/> is in effect,
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
891 this directive specifies a maximum time during which nginx
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
892 will process (read and ignore) additional data coming from a client.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
893 After that, the connection is closed, even if there are more data.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
894 </para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
895
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
896 </directive>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
897
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
898
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
899 <directive name="lingering_timeout">
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
900 <syntax><argument>time</argument></syntax>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
901 <default>5s</default>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
902 <context>http</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
903 <context>server</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
904 <context>location</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
905
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
906 <para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
907 When <link id="lingering_close"/> is in effect, this directive specifies
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
908 a maximum waiting time for more client data to arrive.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
909 If data are not received during this time, the connection is closed.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
910 Otherwise, data are read and ignored, then nginx waits again for more data.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
911 The “wait-read-ignore” cycle is repeated, but no longer than specified by the
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
912 <link id="lingering_time"/> directive.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
913 </para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
914
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
915 </directive>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
916
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
917
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
918 <directive name="listen">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
919 <syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
920 <argument>address</argument>[:<argument>port</argument>]
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
921 [<parameter>default_server</parameter>]
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
922 [<parameter>setfib</parameter>=<argument>number</argument>]
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
923 [<parameter>backlog</parameter>=<argument>number</argument>]
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
924 [<parameter>rcvbuf</parameter>=<argument>size</argument>]
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
925 [<parameter>sndbuf</parameter>=<argument>size</argument>]
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
926 [<parameter>accept_filter</parameter>=<argument>filter</argument>]
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
927 [<parameter>deferred</parameter>]
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
928 [<parameter>bind</parameter>]
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
929 [<parameter>ipv6only</parameter>=<value>on</value>|<value>off</value>]
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
930 [<parameter>ssl</parameter>]
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
931 </syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
932 <syntax>
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
933 <argument>port</argument>
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
934 [<parameter>default_server</parameter>]
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
935 [<parameter>setfib</parameter>=<argument>number</argument>]
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
936 [<parameter>backlog</parameter>=<argument>number</argument>]
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
937 [<parameter>rcvbuf</parameter>=<argument>size</argument>]
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
938 [<parameter>sndbuf</parameter>=<argument>size</argument>]
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
939 [<parameter>accept_filter</parameter>=<argument>filter</argument>]
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
940 [<parameter>deferred</parameter>]
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
941 [<parameter>bind</parameter>]
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
942 [<parameter>ipv6only</parameter>=<value>on</value>|<value>off</value>]
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
943 [<parameter>ssl</parameter>]
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
944 </syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
945 <syntax>
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
946 <value>unix:</value><argument>path</argument>
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
947 [<parameter>default_server</parameter>]
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
948 [<parameter>backlog</parameter>=<argument>number</argument>]
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
949 [<parameter>rcvbuf</parameter>=<argument>size</argument>]
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
950 [<parameter>sndbuf</parameter>=<argument>size</argument>]
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
951 [<parameter>accept_filter</parameter>=<argument>filter</argument>]
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
952 [<parameter>deferred</parameter>]
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
953 [<parameter>bind</parameter>]
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
954 [<parameter>ssl</parameter>]
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
955 </syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
956 <default>*:80 | *:8000</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
957 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
958
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
959 <para>
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
960 Sets an <argument>address</argument> and a <argument>port</argument> for IP,
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
961 or a <argument>path</argument> for a UNIX-domain socket, on which
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
962 the server will accept requests.
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
963 Only one of <argument>address</argument> or <argument>port</argument> may be
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
964 specified.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
965 An <argument>address</argument> may also be a hostname, for example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
966 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
967 listen 127.0.0.1:8000;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
968 listen 127.0.0.1;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
969 listen 8000;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
970 listen *:8000;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
971 listen localhost:8000;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
972 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
973 IPv6 addresses (0.7.36) are specified in square brackets:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
974 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
975 listen [::]:8000;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
976 listen [fe80::1];
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
977 </example>
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
978 UNIX-domain sockets (0.8.21) are specified with the “<code>unix:</code>” prefix:
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
979 <example>
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
980 listen unix:/var/run/nginx.sock;
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
981 </example>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
982 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
983
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
984 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
985 If only <argument>address</argument> is given, the port 80 is used.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
986 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
987
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
988 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
989 If directive is not present then either the <code>*:80</code> is used
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
990 if nginx runs with superuser privileges, or <code>*:8000</code> otherwise.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
991 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
992
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
993 <para>
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
994 The <parameter>default_server</parameter> parameter, if present,
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
995 will cause the server to become the default server for the specified
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
996 <argument>address</argument>:<argument>port</argument> pair.
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
997 If none of the directives have the <parameter>default_server</parameter>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
998 parameter then the first server with the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
999 <argument>address</argument>:<argument>port</argument> pair will be
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1000 the default server for this pair.
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1001 <note>
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1002 In versions prior to 0.8.21 this parameter is named simply
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1003 <parameter>default</parameter>.
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1004 </note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1005 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1006
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1007 <para>
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1008 A <code>listen</code> directive
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1009 can have several additional parameters specific to system calls
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1010 <c-func>listen</c-func> and <c-func>bind</c-func>.
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1011 They can be specified in any
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1012 <code>listen</code> directive, but only once for the given
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1013 <argument>address</argument>:<argument>port</argument> pair.
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1014 <note>
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1015 In versions prior to 0.8.21, they could only be
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1016 specified in the <code>listen</code> directive with the
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1017 <parameter>default</parameter> parameter.
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1018 </note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1019 <list type="tag">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1020
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1021 <tag-name>
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1022 <parameter>setfib</parameter>=<argument>number</argument>
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1023 </tag-name>
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1024 <tag-desc>
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1025 this parameter (0.8.44) sets the associated FIB (routing table)
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1026 for the listening socket.
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1027 This currently works only on FreeBSD.
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1028 </tag-desc>
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1029
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1030 <tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1031 <parameter>backlog</parameter>=<argument>number</argument>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1032 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1033 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1034 sets the <parameter>backlog</parameter> parameter in the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1035 <c-func>listen</c-func> call.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1036 By default, <parameter>backlog</parameter> equals -1 on FreeBSD
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1037 and 511 on other platforms.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1038 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1039
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1040 <tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1041 <parameter>rcvbuf</parameter>=<argument>size</argument>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1042 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1043 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1044 sets the <c-def>SO_RCVBUF</c-def> parameter for the listening socket.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1045 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1046
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1047 <tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1048 <parameter>sndbuf</parameter>=<argument>size</argument>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1049 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1050 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1051 sets the <c-def>SO_SNDBUF</c-def> parameter for the listening socket.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1052 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1053
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1054 <tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1055 <parameter>accept_filter</parameter>=<argument>filter</argument>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1056 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1057 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1058 sets the name of the accept filter.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1059 This works only on FreeBSD, acceptable values are <value>dataready</value>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1060 and <value>httpready</value>.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1061 On receipt of the <c-def>SIGHUP</c-def> signal, an accept filter can only be
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1062 changed in recent versions of FreeBSD, starting from 6.0, 5.4-STABLE
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1063 and 4.11-STABLE.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1064 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1065
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1066 <tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1067 <parameter>deferred</parameter>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1068 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1069 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1070 instructs to use a deferred <c-func>accept</c-func> on Linux
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1071 using the <c-def>TCP_DEFER_ACCEPT</c-def> option.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1072 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1073
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1074 <tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1075 <parameter>bind</parameter>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1076 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1077 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1078 specifies to make a separate <c-func>bind</c-func> call for a given
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1079 <argument>address</argument>:<argument>port</argument> pair.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1080 This is because nginx will only <c-func>bind</c-func> to
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1081 <code>*</code>:<argument>port</argument>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1082 if there are several <code>listen</code> directives with
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1083 the same port but different addresses, and one of the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1084 <code>listen</code> directives listens on all addresses
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1085 for the given port (<code>*</code>:<argument>port</argument>).
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1086 It should be noted that in this case a <c-func>getsockname</c-func>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1087 system call will be made to determine an address that accepted a
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1088 connection.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1089 If parameters <parameter>backlog</parameter>, <parameter>rcvbuf</parameter>,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1090 <parameter>sndbuf</parameter>, <parameter>accept_filter</parameter>, or
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1091 <parameter>deferred</parameter> are used then for a given
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1092 <argument>address</argument>:<argument>port</argument> pair
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1093 a separate <c-func>bind</c-func> call will always be made.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1094 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1095
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1096 <tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1097 <parameter>ipv6only</parameter>=<value>on</value>|<value>off</value>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1098 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1099 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1100 this parameter (0.7.42) sets the value of the <c-def>IPV6_V6ONLY</c-def>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1101 parameter for the listening socket.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1102 This parameter can only be set once on start.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1103 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1104
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1105 <tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1106 <parameter>ssl</parameter>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1107 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1108 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1109 this parameter (0.7.14) does not relate to system calls
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1110 <c-func>listen</c-func> and <c-func>bind</c-func>, but allows to
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1111 specify that all connections accepted on this port should work in
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1112 the SSL mode.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1113 This allows for a more compact configuration for the server operating
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1114 in both HTTP and HTTPS modes simultaneously.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1115 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1116 listen 80;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1117 listen 443 default ssl;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1118 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1119 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1120
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1121 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1122 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1123
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1124 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1125 Example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1126 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1127 listen 127.0.0.1 default accept_filter=dataready backlog=1024;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1128 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1129 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1130
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1131 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1132
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1133
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1134 <directive name="location">
108
72524ae53106 Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents: 106
diff changeset
1135 <syntax block="yes">[
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1136 <value>=</value> |
98
a10bc0cb0a6a Whitespace cleanup.
Ruslan Ermilov <ru@nginx.com>
parents: 89
diff changeset
1137 <value>~</value> |
a10bc0cb0a6a Whitespace cleanup.
Ruslan Ermilov <ru@nginx.com>
parents: 89
diff changeset
1138 <value>~*</value> |
a10bc0cb0a6a Whitespace cleanup.
Ruslan Ermilov <ru@nginx.com>
parents: 89
diff changeset
1139 <value>^~</value>
a10bc0cb0a6a Whitespace cleanup.
Ruslan Ermilov <ru@nginx.com>
parents: 89
diff changeset
1140 ] <argument>uri</argument>
108
72524ae53106 Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents: 106
diff changeset
1141 </syntax>
72524ae53106 Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents: 106
diff changeset
1142 <syntax block="yes"><value>@</value><argument>name</argument></syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1143 <default/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1144 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1145 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1146
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1147 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1148 Sets a configuration based on a request URI.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1149 A location can either be defined by a prefix string, or by a regular expression.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1150 Regular expressions are specified by prepending them with the
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
1151 “<value>~*</value>” prefix (for case-insensitive matching), or with the
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
1152 “<value>~</value>” prefix (for case-sensitive matching).
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1153 To find a location matching a given request, nginx first checks
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1154 locations defined using the prefix strings (prefix locations).
88
6876e2558d09 Spell checking.
Ruslan Ermilov <ru@nginx.com>
parents: 86
diff changeset
1155 Among them, the most specific one is searched.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1156 Then regular expressions are checked, in the order of their appearance
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1157 in a configuration file.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1158 A search terminates on the first match, and its corresponding
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1159 configuration is used.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1160 If no match with a regular expression location is found then a
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1161 configuration of the most specific prefix location is used.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1162 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1163
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1164 <para>
67
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1165 Locations can be nested, with some exceptions mentioned below.
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1166 </para>
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1167
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1168 <para>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1169 For case-insensitive operating systems such as Mac OS X and Cygwin,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1170 the string matching ignores a case (0.7.7).
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1171 However, comparison is limited to one-byte locales.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1172 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1173
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1174 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1175 Regular expressions can contain captures (0.7.40) that can later
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1176 be used in other directives.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1177 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1178
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1179 <para>
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
1180 If the most specific prefix location has the “<value>^~</value>” prefix
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1181 then regular expressions are not checked.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1182 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1183
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1184 <para>
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
1185 Also, using the “<value>=</value>” prefix it is possible to define
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1186 an exact match of URI and location.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1187 If an exact match is found, the search terminates.
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
1188 For example, if a “<code>/</code>” request happens frequently,
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
1189 defining “<code>location = /</code>” will speed up the processing
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1190 of these requests, as search terminates right after the first
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1191 comparison.
67
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1192 Such a location cannot obviously contain nested locations.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1193 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1194
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1195 <para>
67
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1196 <note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1197 In versions from 0.7.1 to 0.8.41, if a request matched the prefix
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
1198 location without the “<value>=</value>” and “<value>^~</value>”
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1199 prefixes, the search also terminated and regular expressions were
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1200 not checked.
67
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1201 </note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1202 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1203
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1204 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1205 Let's illustrate the above by example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1206 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1207 location = / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1208 [ configuration A ]
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1209 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1210
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1211 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1212 [ configuration B ]
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1213 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1214
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1215 location ^~ /images/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1216 [ configuration C ]
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1217 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1218
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1219 location ~* \.(gif|jpg|jpeg)$ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1220 [ configuration D ]
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1221 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1222 </example>
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
1223 The “<code>/</code>” request will match configuration A,
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
1224 the “<code>/documents/document.html</code>” request will match
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1225 configuration B,
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
1226 the “<code>/images/1.gif</code>” request will match configuration C, and
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
1227 the “<code>/documents/1.jpg</code>” request will match configuration D.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1228 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1229
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1230 <para>
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
1231 The “<value>@</value>” prefix defines a named location.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1232 Such a location is not used for a regular request processing, but instead
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1233 used for request redirection.
67
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1234 They cannot be nested, and cannot contain nested locations.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1235 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1236
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1237 <!--
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1238 <migration from="Apache" directive="Location" />
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1239 -->
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1240
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1241 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1242
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1243
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1244 <directive name="log_not_found">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1245 <syntax><value>on</value> | <value>off</value></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1246 <default>on</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1247 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1248 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1249 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1250
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1251 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1252 Enables or disables logging of errors about not found files into the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1253 <link doc="../ngx_core_module.xml" id="error_log"/>.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1254 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1255
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1256 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1257
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1258
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1259 <directive name="log_subrequest">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1260 <syntax><value>on</value> | <value>off</value></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1261 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1262 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1263 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1264 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1265
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1266 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1267 Enables or disables logging of subrequests into the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1268 <link doc="ngx_http_log_module.xml" id="access_log"/>.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1269 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1270
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1271 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1272
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1273
175
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1274 <directive name="max_ranges">
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1275 <syntax><argument>number</argument></syntax>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1276 <default/>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1277 <context>http</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1278 <context>server</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1279 <context>location</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1280
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1281 <para>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1282 Limits the maximum allowed number of ranges in byte-range requests.
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1283 Requests that exceed the limit are processed as if there were no
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1284 byte ranges specified.
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1285 By default, there is no limit.
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1286 The value of zero disables the byte-range support completely.
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1287 </para>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1288
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1289 </directive>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1290
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1291
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1292 <directive name="merge_slashes">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1293 <syntax><value>on</value> | <value>off</value></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1294 <default>on</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1295 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1296 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1297
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1298 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1299 Enables or disables compression of two or more adjacent slashes
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1300 in a URI into a single slash.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1301 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1302
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1303 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1304 Note that compression is essential for the correct prefix string
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1305 and regular expressions location matching.
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
1306 Without it, the “<code>//scripts/one.php</code>” request would not match
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1307 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1308 location /scripts/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1309 ...
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1310 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1311 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1312 and might be processed as a static file,
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
1313 so it gets converted to “<code>/scripts/one.php</code>”.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1314 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1315
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1316 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1317 Turning the compression <value>off</value> can become necessary if a URI
68
9de85defbcf8 - "optimize_server_names" is deprecated in favour of "server_name_in_redirects"
Ruslan Ermilov <ru@nginx.com>
parents: 67
diff changeset
1318 contains base64-encoded names, since base64 uses the “/” character internally.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1319 However, for security considerations, it is better to avoid turning off
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1320 the compression.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1321 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1322
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1323 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1324 If a directive is specified on the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1325 <link id="server"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1326 level, which is also a default server, its value will cover
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1327 all virtual servers listening on the same address and port.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1328 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1329
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1330 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1331
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1332
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1333 <directive name="msie_padding">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1334 <syntax><value>on</value> | <value>off</value></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1335 <default>on</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1336 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1337 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1338 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1339
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1340 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1341 Enables or disables adding of comments to responses with status
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1342 greater than 400 for MSIE clients, to pad the response size to 512 bytes.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1343 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1344
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1345 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1346
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1347
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1348 <directive name="msie_refresh">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1349 <syntax><value>on</value> | <value>off</value></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1350 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1351 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1352 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1353 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1354
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1355 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1356 Enables or disables issuing refreshes instead of redirects, for MSIE clients.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1357 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1358
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1359 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1360
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1361
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1362 <directive name="open_file_cache">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1363 <syntax><value>off</value></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1364 <syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1365 <parameter>max</parameter>=<argument>N</argument>
68
9de85defbcf8 - "optimize_server_names" is deprecated in favour of "server_name_in_redirects"
Ruslan Ermilov <ru@nginx.com>
parents: 67
diff changeset
1366 [<parameter>inactive</parameter>=<argument>time</argument>]
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1367 </syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1368 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1369 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1370 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1371 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1372
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1373 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1374 Configures a cache that can store:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1375 <list type="bullet">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1376
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1377 <listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1378 open file descriptors, their sizes and modification times;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1379 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1380
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1381 <listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1382 directory lookups;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1383 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1384
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1385 <listitem>
68
9de85defbcf8 - "optimize_server_names" is deprecated in favour of "server_name_in_redirects"
Ruslan Ermilov <ru@nginx.com>
parents: 67
diff changeset
1386 file lookup errors, such as “file not found”, “no read permission”,
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1387 and so on.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1388 Caching of errors should be enabled separately by the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1389 <link id="open_file_cache_errors"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1390 directive.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1391 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1392
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1393 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1394 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1395
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1396 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1397 The directive has the following parameters:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1398 <list type="tag">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1399
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1400 <tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1401 <parameter>max</parameter>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1402 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1403 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1404 sets the maximum number of elements in the cache;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1405 on cache overflow the least recently used (LRU) elements get removed;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1406 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1407
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1408 <tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1409 <parameter>inactive</parameter>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1410 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1411 <tag-desc>
68
9de85defbcf8 - "optimize_server_names" is deprecated in favour of "server_name_in_redirects"
Ruslan Ermilov <ru@nginx.com>
parents: 67
diff changeset
1412 defines a time, after which an element gets removed from the cache
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1413 if there were no accesses to it during this time;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1414 by default, it is 60 seconds;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1415 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1416
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1417 <tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1418 <value>off</value>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1419 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1420 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1421 disables the cache.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1422 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1423
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1424 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1425 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1426
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1427 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1428 Example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1429 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1430 open_file_cache max=1000 inactive=20s;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1431 open_file_cache_valid 30s;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1432 open_file_cache_min_uses 2;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1433 open_file_cache_errors on;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1434 <!--
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1435 open_file_cache_events on;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1436 -->
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1437 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1438 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1439
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1440 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1441
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1442
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1443 <directive name="open_file_cache_errors">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1444 <syntax><value>on</value> | <value>off</value></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1445 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1446 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1447 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1448 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1449
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1450 <para>
68
9de85defbcf8 - "optimize_server_names" is deprecated in favour of "server_name_in_redirects"
Ruslan Ermilov <ru@nginx.com>
parents: 67
diff changeset
1451 Enables or disables caching of file lookup errors by
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1452 <link id="open_file_cache"/>.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1453 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1454
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1455 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1456
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1457
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1458 <!--
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1459
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1460 <directive name="open_file_cache_events">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1461 <syntax><value>on</value> | <value>off</value></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1462 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1463 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1464 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1465 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1466
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1467 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1468 Enables to use kernel events to validate
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1469 <link id="open_file_cache"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1470 elements.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1471 This directive works with the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1472 <link doc="../events.xml" id="kqueue"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1473 method only.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1474 Note that only NetBSD&nbsp;2.0+ and FreeBSD&nbsp;6.0+
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1475 support events for arbitrary file system types.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1476 Other operating systems support events only for essential
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1477 file systems such as UFS or FFS.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1478 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1479
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1480 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1481
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1482 -->
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1483
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1484
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1485 <directive name="open_file_cache_min_uses">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1486 <syntax><argument>number</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1487 <default>1</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1488 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1489 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1490 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1491
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1492 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1493 Sets the minimum <argument>number</argument> of file accesses during
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1494 the period configured by the <parameter>inactive</parameter> parameter
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1495 of the <link id="open_file_cache"/> directive,
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1496 after which a file descriptor will remain open in the cache.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1497 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1498
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1499 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1500
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1501
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1502 <directive name="open_file_cache_valid">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1503 <syntax><argument>time</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1504 <default>60s</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1505 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1506 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1507 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1508
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1509 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1510 Sets a time after which
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1511 <link id="open_file_cache"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1512 elements should be validated.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1513 <!--
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1514 When
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1515 <link id="open_file_cache_events"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1516 is enabled, open file descriptors
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1517 are checked only once, and then updated right after they get changed.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1518 -->
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1519 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1520
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1521 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1522
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1523
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1524 <directive name="optimize_server_names">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1525 <syntax><value>on</value> | <value>off</value></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1526 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1527 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1528 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1529
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1530 <para>
68
9de85defbcf8 - "optimize_server_names" is deprecated in favour of "server_name_in_redirects"
Ruslan Ermilov <ru@nginx.com>
parents: 67
diff changeset
1531 This directive is made obsolete by the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1532 <link id="server_name_in_redirect"/> directive.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1533 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1534
68
9de85defbcf8 - "optimize_server_names" is deprecated in favour of "server_name_in_redirects"
Ruslan Ermilov <ru@nginx.com>
parents: 67
diff changeset
1535 <!--
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1536 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1537 Enables or disables optimization of hostname checking in name-based
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1538 virtual servers.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1539 In particular, the checking affects hostnames used in redirects.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1540 If optimization is enabled, and all name-based servers listening on
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1541 the same address:port pair have identical configuration, then
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1542 names are not checked during request processing, and the first
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1543 server name is used in redirects.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1544 In case redirects should use hostnames sent by clients,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1545 optimization needs to be disabled.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1546 </para>
68
9de85defbcf8 - "optimize_server_names" is deprecated in favour of "server_name_in_redirects"
Ruslan Ermilov <ru@nginx.com>
parents: 67
diff changeset
1547 -->
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1548
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1549 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1550
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1551
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1552 <directive name="port_in_redirect">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1553 <syntax><value>on</value> | <value>off</value></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1554 <default>on</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1555 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1556 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1557 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1558
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1559 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1560 Enables or disables specifying the port in redirects issued by nginx.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1561 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1562
159
8c124aef0041 Cross-linked "server_name_in_redirect" and "port_in_redirect" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 152
diff changeset
1563 <para>
8c124aef0041 Cross-linked "server_name_in_redirect" and "port_in_redirect" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 152
diff changeset
1564 See also the <link id="server_name_in_redirect"/> directive.
8c124aef0041 Cross-linked "server_name_in_redirect" and "port_in_redirect" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 152
diff changeset
1565 </para>
8c124aef0041 Cross-linked "server_name_in_redirect" and "port_in_redirect" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 152
diff changeset
1566
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1567 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1568
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1569
175
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1570 <directive name="postpone_output">
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1571 <syntax><argument>size</argument></syntax>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1572 <default>1460</default>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1573 <context>http</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1574 <context>server</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1575 <context>location</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1576
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1577 <para>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1578 If possible, the output of client data will be postponed until
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1579 nginx has at least <argument>size</argument> bytes of data to send.
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1580 Value of zero disables postponing.
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1581 </para>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1582
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1583 </directive>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1584
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1585
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1586 <directive name="read_ahead">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1587 <syntax><argument>size</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1588 <default>0</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1589 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1590 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1591 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1592
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1593 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1594 Sets the amount of pre-reading when working with files, in the kernel.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1595 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1596
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1597 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1598 On Linux, the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1599 <code>posix_fadvise(0, 0, 0, POSIX_FADV_SEQUENTIAL)</code>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1600 system call is used, so the <argument>size</argument> argument is ignored.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1601 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1602
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1603 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1604 On FreeBSD, the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1605 <code>fcntl(O_READAHEAD,</code><argument>size</argument><code>)</code>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1606 system call is used, supported in FreeBSD&nbsp;9.0-CURRENT.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1607 FreeBSD&nbsp;7 needs to be
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1608 <link url="http://sysoev.ru/freebsd/patch.readahead.txt">patched</link>.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1609 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1610
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1611 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1612
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1613
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1614 <directive name="recursive_error_pages">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1615 <syntax><value>on</value> | <value>off</value></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1616 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1617 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1618 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1619 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1620
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1621 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1622 Enables or disables doing several redirects using the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1623 <link id="error_page"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1624 directive.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1625 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1626
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1627 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1628
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1629
169
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1630 <directive name="request_pool_size">
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1631 <syntax><argument>size</argument></syntax>
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1632 <default>4k</default>
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1633 <context>http</context>
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1634 <context>server</context>
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1635
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1636 <para>
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1637 Allows to fine tune per-request memory allocations.
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1638 This directive has minimal impact on performance,
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1639 and should not generally be used.
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1640 </para>
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1641
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1642 </directive>
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1643
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1644
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1645 <directive name="reset_timedout_connection">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1646 <syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1647 <value>on</value> | <value>off</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1648 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1649 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1650 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1651 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1652
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1653 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1654 Enables or disables resetting of timed out connections.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1655 The reset is performed as follows: before closing a socket, the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1656 <c-def>SO_LINGER</c-def>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1657 option is set on it with a timeout value of 0.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1658 When the socket is closed, a client is sent TCP RST, and all memory
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1659 occupied by this socket is freed.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1660 This avoids keeping of an already closed socket with filled buffers
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1661 for a long time, in a FIN_WAIT1 state.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1662 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1663
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1664 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1665 It should be noted that timed out keep-alive connections are still
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1666 closed normally.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1667 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1668
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1669 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1670
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1671
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1672 <directive name="resolver">
143
370cf5ccd3ca The "resolver" directive now allows specifying multiple name servers.
Ruslan Ermilov <ru@nginx.com>
parents: 140
diff changeset
1673 <syntax><argument>address</argument> ...</syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1674 <default/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1675 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1676 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1677 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1678
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1679 <para>
143
370cf5ccd3ca The "resolver" directive now allows specifying multiple name servers.
Ruslan Ermilov <ru@nginx.com>
parents: 140
diff changeset
1680 Configures name servers used to resolve upstream server names,
370cf5ccd3ca The "resolver" directive now allows specifying multiple name servers.
Ruslan Ermilov <ru@nginx.com>
parents: 140
diff changeset
1681 for example:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1682 <example>
143
370cf5ccd3ca The "resolver" directive now allows specifying multiple name servers.
Ruslan Ermilov <ru@nginx.com>
parents: 140
diff changeset
1683 resolver 127.0.0.1 192.0.2.1;
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1684 </example>
143
370cf5ccd3ca The "resolver" directive now allows specifying multiple name servers.
Ruslan Ermilov <ru@nginx.com>
parents: 140
diff changeset
1685 An <argument>address</argument> argument may be specified as
370cf5ccd3ca The "resolver" directive now allows specifying multiple name servers.
Ruslan Ermilov <ru@nginx.com>
parents: 140
diff changeset
1686 either an IPv4 address or a hostname;
370cf5ccd3ca The "resolver" directive now allows specifying multiple name servers.
Ruslan Ermilov <ru@nginx.com>
parents: 140
diff changeset
1687 in the latter case, the first resolved IPv4 address is used.
370cf5ccd3ca The "resolver" directive now allows specifying multiple name servers.
Ruslan Ermilov <ru@nginx.com>
parents: 140
diff changeset
1688 Name servers are queried in a round-robin fashion.
370cf5ccd3ca The "resolver" directive now allows specifying multiple name servers.
Ruslan Ermilov <ru@nginx.com>
parents: 140
diff changeset
1689 <note>
370cf5ccd3ca The "resolver" directive now allows specifying multiple name servers.
Ruslan Ermilov <ru@nginx.com>
parents: 140
diff changeset
1690 Before version 1.1.7, only a single name server could be configured.
370cf5ccd3ca The "resolver" directive now allows specifying multiple name servers.
Ruslan Ermilov <ru@nginx.com>
parents: 140
diff changeset
1691 </note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1692 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1693
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1694 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1695
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1696
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1697 <directive name="resolver_timeout">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1698 <syntax><argument>time</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1699 <default>30s</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1700 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1701 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1702 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1703
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1704 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1705 Sets a timeout for name resolution, for example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1706 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1707 resolver_timeout 5s;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1708 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1709 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1710
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1711 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1712
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1713
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1714 <directive name="root">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1715 <syntax><argument>path</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1716 <default>html</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1717 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1718 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1719 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1720 <context>if in location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1721
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1722 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1723 Sets the root directory for requests.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1724 For example, with the following configuration
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1725 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1726 location /i/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1727 root /data/w3;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1728 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1729 </example>
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
1730 “<code>/i/top.gif</code>” will be responded
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1731 with the file
148
682163f2b298 Unified article/path and module/pathname into a single "path".
Ruslan Ermilov <ru@nginx.com>
parents: 147
diff changeset
1732 <path>/data/w3/i/top.gif</path>.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1733 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1734
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1735 <para>
69
935beaa561b3 - use of $document_root and $realpath_root in "root" is prohibited
Ruslan Ermilov <ru@nginx.com>
parents: 68
diff changeset
1736 The <argument>path</argument> value can contain variables
935beaa561b3 - use of $document_root and $realpath_root in "root" is prohibited
Ruslan Ermilov <ru@nginx.com>
parents: 68
diff changeset
1737 except <var>$document_root</var> and <var>$realpath_root</var>.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1738 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1739
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1740 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1741 A path to the file is constructed by merely adding a URI to the value
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1742 of the <code>root</code> directive.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1743 If a URI need to be modified, the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1744 <link id="alias"/> directive should be used.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1745 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1746
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1747 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1748
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1749
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1750 <directive name="satisfy">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1751 <syntax><value>all</value> | <value>any</value></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1752 <default>all</default>
69
935beaa561b3 - use of $document_root and $realpath_root in "root" is prohibited
Ruslan Ermilov <ru@nginx.com>
parents: 68
diff changeset
1753 <context>http</context>
935beaa561b3 - use of $document_root and $realpath_root in "root" is prohibited
Ruslan Ermilov <ru@nginx.com>
parents: 68
diff changeset
1754 <context>server</context>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1755 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1756
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1757 <para>
69
935beaa561b3 - use of $document_root and $realpath_root in "root" is prohibited
Ruslan Ermilov <ru@nginx.com>
parents: 68
diff changeset
1758 Allows access if <value>all</value> or <value>any</value> of the
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1759 <link doc="ngx_http_access_module.xml">ngx_http_access_module</link>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1760 or <link doc="ngx_http_auth_basic_module.xml">ngx_http_auth_basic_module</link>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1761 modules grant access.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1762 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1763 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1764 satisfy any;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1765
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1766 allow 192.168.1.0/32;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1767 deny all;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1768
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1769 auth_basic "closed site";
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1770 auth_basic_user_file conf/htpasswd;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1771 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1772 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1773 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1774
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1775 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1776
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1777
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1778 <directive name="satisfy_any">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1779 <syntax><value>on</value> | <value>off</value></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1780 <default>off</default>
69
935beaa561b3 - use of $document_root and $realpath_root in "root" is prohibited
Ruslan Ermilov <ru@nginx.com>
parents: 68
diff changeset
1781 <context>http</context>
935beaa561b3 - use of $document_root and $realpath_root in "root" is prohibited
Ruslan Ermilov <ru@nginx.com>
parents: 68
diff changeset
1782 <context>server</context>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1783 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1784
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1785 <para>
69
935beaa561b3 - use of $document_root and $realpath_root in "root" is prohibited
Ruslan Ermilov <ru@nginx.com>
parents: 68
diff changeset
1786 This directive was renamed to the <link id="satisfy">satisfy any</link>
935beaa561b3 - use of $document_root and $realpath_root in "root" is prohibited
Ruslan Ermilov <ru@nginx.com>
parents: 68
diff changeset
1787 directive.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1788 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1789
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1790 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1791
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1792
176
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1793 <directive name="send_lowat">
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1794 <syntax><argument>size</argument></syntax>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1795 <default>0</default>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1796 <context>http</context>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1797 <context>server</context>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1798 <context>location</context>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1799
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1800 <para>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1801 If set to a non-zero value, nginx will try to minimize the number
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1802 of send operations on client sockets by using either
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1803 <c-def>NOTE_LOWAT</c-def> flag of
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1804 <link doc="../events.xml" id="kqueue"/>,
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1805 or the <c-def>SO_SNDLOWAT</c-def> socket option,
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1806 with the specified <argument>size</argument>.
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1807 </para>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1808
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1809 <para>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1810 This directive is ignored on Linux, Solaris, and Windows.
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1811 </para>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1812
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1813 </directive>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1814
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
1815
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1816 <directive name="send_timeout">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1817 <syntax><argument>time</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1818 <default>60s</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1819 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1820 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1821 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1822
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1823 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1824 Sets a timeout for transmitting a response to the client.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1825 A timeout is only set between two successive write operations,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1826 not for the transmission of the whole response.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1827 If a client does not receive anything within this time,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1828 a connection is closed.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1829 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1830
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1831 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1832
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1833
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1834 <directive name="sendfile">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1835
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1836 <syntax><value>on</value> | <value>off</value></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1837 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1838 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1839 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1840 <context>location</context>
69
935beaa561b3 - use of $document_root and $realpath_root in "root" is prohibited
Ruslan Ermilov <ru@nginx.com>
parents: 68
diff changeset
1841 <context>if in location</context>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1842
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1843 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1844 Enables or disables the use of
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1845 <c-func>sendfile</c-func>.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1846 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1847
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1848 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1849
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1850
175
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1851 <directive name="sendfile_max_chunk">
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1852
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1853 <syntax><argument>size</argument></syntax>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1854 <default>0</default>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1855 <context>http</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1856 <context>server</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1857 <context>location</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1858
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1859 <para>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1860 When set to a non-zero value, limits the amount of data that can be
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1861 transferred in a single <c-func>sendfile</c-func> call.
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1862 Without the limit, one fast connection may seize the worker process.
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1863 </para>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1864
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1865 </directive>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1866
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1867
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1868 <directive name="server">
108
72524ae53106 Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents: 106
diff changeset
1869 <syntax block="yes"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1870 <default/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1871 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1872
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1873 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1874 Sets a configuration for the virtual server.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1875 There is no clean separation between IP-based (based on the IP address)
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1876 and name-based (based on the <header>Host</header> request header field)
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1877 virtual servers.
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1878 Instead, the <link id="listen"/> directives describe all
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1879 addresses and ports that should accept connections for a server, and the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1880 <link id="server_name"/> directive lists all server names.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1881 An example configuration is provided in the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1882 <link doc="../virtual_hosts.xml">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1883 Setting Up Virtual Servers</link> document.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1884 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1885
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1886 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1887
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1888
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1889 <directive name="server_name">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1890 <syntax><argument>name</argument> ...</syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1891 <default>""</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1892 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1893
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1894 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1895 Sets names of the virtual server, for example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1896 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1897 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1898 server_name example.com www.example.com;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1899 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1900 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1901 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1902
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1903 <para>
70
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
1904 The first name becomes the primary server name.
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
1905 Server names can include an asterisk (“<code>*</code>”)
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1906 to replace the first or last part of a name:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1907 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1908 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1909 server_name example.com *.example.com www.example.*;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1910 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1911 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1912 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1913
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1914 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1915 The first two of the above mentioned names can be combined:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1916 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1917 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1918 server_name .example.com;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1919 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1920 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1921 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1922
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1923 <para>
70
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
1924 If the argument equals “<var>$hostname</var>” (0.9.4), the
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
1925 machine's hostname is substituted.
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
1926 </para>
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
1927
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
1928 <para>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1929 It is also possible to use regular expressions in server names,
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
1930 prepending the name with a tilde (“<code>~</code>”):
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1931 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1932 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1933 server_name www.example.com ~^www\d+\.example\.com$;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1934 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1935 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1936 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1937
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1938 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1939 Regular expressions can contain captures (0.7.40) that can later
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1940 be used in other directives:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1941 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1942 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1943 server_name ~^(www\.)?(.+)$;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1944
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1945 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1946 root /sites/$2;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1947 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1948 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1949
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1950 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1951 server_name _;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1952
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1953 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1954 root /sites/default;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1955 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1956 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1957 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1958 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1959
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1960 <para>
70
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
1961 Named captures in regular expressions create variables (0.8.25)
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
1962 that can later be used in other directives:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1963 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1964 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1965 server_name ~^(www\.)?(?&lt;domain&gt;.+)$;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1966
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1967 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1968 root /sites/$domain;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1969 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1970 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1971
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1972 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1973 server_name _;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1974
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1975 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1976 root /sites/default;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1977 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1978 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1979 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1980 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1981
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1982 <para>
70
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
1983 It is also possible to specify an empty server name (0.7.11):
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1984 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1985 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1986 server_name www.example.com "";
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1987 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1988 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1989 It allows this server to process requests without the <header>Host</header>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1990 header, instead of the default server for the given address:port pair.
70
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
1991 This is the default setting.
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
1992 <note>
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
1993 Before 0.8.48, the machine's hostname was used by default.
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
1994 </note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1995 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1996
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1997 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1998 The name checking order is as follows:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1999 <list type="enum">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2000
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2001 <listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2002 full names
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2003 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2004
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2005 <listitem>
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
2006 names with the prefix mask, e.g. “<code>*.example.com</code>”
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2007 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2008
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2009 <listitem>
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
2010 names with the suffix mask, e.g. “<code>mail.*</code>”
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2011 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2012
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2013 <listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2014 regular expressions
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2015 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2016
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2017 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2018 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2019
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2020 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2021
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2022
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2023 <directive name="server_name_in_redirect">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2024 <syntax><value>on</value> | <value>off</value></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2025 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2026 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2027 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2028 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2029
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2030 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2031 Enables or disables the use of the primary server name, specified by the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
2032 <link id="server_name"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2033 directive, in redirects issued by nginx.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2034 When disabled, the name from the <header>Host</header> request header field
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2035 is used.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2036 If this field is not present, an IP address of the server is used.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2037 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2038
159
8c124aef0041 Cross-linked "server_name_in_redirect" and "port_in_redirect" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 152
diff changeset
2039 <para>
8c124aef0041 Cross-linked "server_name_in_redirect" and "port_in_redirect" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 152
diff changeset
2040 See also the <link id="port_in_redirect"/> directive.
8c124aef0041 Cross-linked "server_name_in_redirect" and "port_in_redirect" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 152
diff changeset
2041 </para>
8c124aef0041 Cross-linked "server_name_in_redirect" and "port_in_redirect" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 152
diff changeset
2042
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2043 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2044
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2045
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2046 <directive name="server_names_hash_bucket_size">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2047 <syntax><argument>size</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2048 <default>32|64|128</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2049 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2050
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2051 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2052 Sets the bucket size for the server names hash tables.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2053 Default value depends on the size of the processor's cache line.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2054 For more information, please refer to
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2055 <link doc="../hash.xml">Setting Up Hashes</link>.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2056 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2057
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2058 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2059
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2060
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2061 <directive name="server_names_hash_max_size">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2062 <syntax><argument>size</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2063 <default>512</default>
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2064 <context>http</context>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2065
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2066 <para>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2067 Sets the maximum <argument>size</argument> of the server names hash tables.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2068 For more information, please refer to
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2069 <link doc="../hash.xml">Setting Up Hashes</link>.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2070 </para>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2071
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2072 </directive>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2073
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2074
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2075 <directive name="server_tokens">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2076 <syntax><value>on</value> | <value>off</value></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2077 <default>on</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2078 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2079 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2080 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2081
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2082 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2083 Enables or disables emitting of nginx version in error messages and in the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2084 <header>Server</header> response header field.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2085 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2086
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2087 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2088
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2089
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2090 <directive name="tcp_nodelay">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2091 <syntax><value>on</value> | <value>off</value></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2092 <default>on</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2093 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2094 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2095 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2096
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2097 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2098 Enables or disables the use of the <c-def>TCP_NODELAY</c-def> option.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2099 The option is enabled only when a connection is transitioned into the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2100 keep-alive state.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2101 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2102
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2103 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2104
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2105
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2106 <directive name="tcp_nopush">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2107 <syntax><value>on</value> | <value>off</value></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2108 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2109 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2110 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2111 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2112
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2113 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2114 Enables or disables the use of
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2115 the <c-def>TCP_NOPUSH</c-def> socket option on FreeBSD
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2116 or the <c-def>TCP_CORK</c-def> socket option on Linux.
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
2117 Options are enabled only when <link id="sendfile"/> is used.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2118 Enabling the option allows to
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2119 <list type="bullet">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2120
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2121 <listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2122 send the response header and the beginning of a file in one packet,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2123 on Linux and FreeBSD&nbsp;4.*;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2124 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2125
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2126 <listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2127 send a file in full packets.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2128 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2129
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2130 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2131 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2132
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2133 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2134
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2135
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2136 <directive name="try_files">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2137 <syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2138 <argument>file</argument> ...
98
a10bc0cb0a6a Whitespace cleanup.
Ruslan Ermilov <ru@nginx.com>
parents: 89
diff changeset
2139 <argument>uri</argument>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2140 </syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2141 <syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2142 <argument>file</argument> ...
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2143 =<argument>code</argument>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2144 </syntax>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2145 <default/>
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2146 <context>server</context>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2147 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2148
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2149 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2150 Checks the existence of files in the specified order, and uses
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2151 the first found file for request processing; the processing
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2152 is performed in the current context.
174
69c131b0ebe0 Rephrased a sentence about "try_files" so that "alias" isn't called a prefix.
Ruslan Ermilov <ru@nginx.com>
parents: 173
diff changeset
2153 A path to the file is constructed from the
69c131b0ebe0 Rephrased a sentence about "try_files" so that "alias" isn't called a prefix.
Ruslan Ermilov <ru@nginx.com>
parents: 173
diff changeset
2154 <argument>file</argument> argument
69c131b0ebe0 Rephrased a sentence about "try_files" so that "alias" isn't called a prefix.
Ruslan Ermilov <ru@nginx.com>
parents: 173
diff changeset
2155 according to the
69c131b0ebe0 Rephrased a sentence about "try_files" so that "alias" isn't called a prefix.
Ruslan Ermilov <ru@nginx.com>
parents: 173
diff changeset
2156 <link id="root"/> and <link id="alias"/> directives.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2157 It is possible to check the directory existence by specifying
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
2158 a slash at the end of a name, e.g. “<code>$uri/</code>”.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2159 If none of the files were found, an internal redirect to the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2160 <argument>uri</argument> specified by the last argument is made.
173
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2161 For example:
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2162 <example>
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2163 location /images/ {
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2164 try_files $uri /images/default.gif;
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2165 }
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2166
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2167 location = /images/default.gif {
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2168 expires 30s;
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2169 }
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2170 </example>
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2171 The last argument can also point to a named location,
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2172 see examples below.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2173 As of version 0.7.51, the last argument can also be a
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2174 <argument>code</argument>:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2175 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2176 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2177 try_files $uri $uri/index.html $uri.html =404;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2178 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2179 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2180 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2181
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2182 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2183 Example when proxying Mongrel:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2184 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2185 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2186 try_files /system/maintenance.html
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2187 $uri $uri/index.html $uri.html
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2188 @mongrel;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2189 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2190
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2191 location @mongrel {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2192 proxy_pass http://mongrel;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2193 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2194 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2195 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2196
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2197 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2198 Example for Drupal/FastCGI:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2199 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2200 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2201 try_files $uri $uri/ @drupal;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2202 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2203
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2204 location ~ \.php$ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2205 try_files $uri @drupal;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2206
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2207 fastcgi_pass ...;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2208
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2209 fastcgi_param SCRIPT_FILENAME /path/to$fastcgi_script_name;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2210 fastcgi_param SCRIPT_NAME $fastcgi_script_name;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2211 fastcgi_param QUERY_STRING $args;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2212
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2213 ... other fastcgi_param's
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2214 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2215
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2216 location @drupal {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2217 fastcgi_pass ...;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2218
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2219 fastcgi_param SCRIPT_FILENAME /path/to/index.php;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2220 fastcgi_param SCRIPT_NAME /index.php;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2221 fastcgi_param QUERY_STRING q=$uri&amp;$args;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2222
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2223 ... other fastcgi_param's
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2224 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2225 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2226 In the following example,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2227 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2228 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2229 try_files $uri $uri/ @drupal;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2230 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2231 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2232 the <code>try_files</code> directive is equivalent to
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2233 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2234 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2235 error_page 404 = @drupal;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2236 log_not_found off;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2237 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2238 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2239 And here,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2240 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2241 location ~ \.php$ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2242 try_files $uri @drupal;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2243
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2244 fastcgi_pass ...;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2245
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2246 fastcgi_param SCRIPT_FILENAME /path/to$fastcgi_script_name;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2247
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2248 ...
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2249 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2250 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2251 <code>try_files</code> checks the existence of the PHP file
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2252 before passing the request to the FastCGI server.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2253 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2254
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2255 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2256 Example for Wordpress and Joomla:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2257 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2258 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2259 try_files $uri $uri/ @wordpress;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2260 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2261
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2262 location ~ \.php$ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2263 try_files $uri @wordpress;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2264
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2265 fastcgi_pass ...;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2266
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2267 fastcgi_param SCRIPT_FILENAME /path/to$fastcgi_script_name;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2268 ... other fastcgi_param's
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2269 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2270
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2271 location @wordpress {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2272 fastcgi_pass ...;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2273
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2274 fastcgi_param SCRIPT_FILENAME /path/to/index.php;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2275 ... other fastcgi_param's
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2276 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2277 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2278 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2279
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2280 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2281
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2282
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2283 <directive name="types">
108
72524ae53106 Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents: 106
diff changeset
2284 <syntax block="yes"/>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2285 <default>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2286 text/html html;
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2287 image/gif gif;
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2288 image/jpeg jpg;
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2289 </default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2290 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2291 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2292 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2293
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2294 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2295 Maps file name extensions to MIME types of responses.
160
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2296 Extensions are case-insensitive.
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2297 Several extensions can map to one type, for example:
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2298 <example>
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2299 types {
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2300 application/octet-stream bin exe dll;
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2301 application/octet-stream deb;
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2302 application/octet-stream dmg;
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2303 }
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2304 </example>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2305 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2306
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2307 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2308 A sufficiently full mapping table is distributed with nginx in the
148
682163f2b298 Unified article/path and module/pathname into a single "path".
Ruslan Ermilov <ru@nginx.com>
parents: 147
diff changeset
2309 <path>conf/mime.types</path> file.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2310 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2311
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2312 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2313 To make a particular location emit the
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
2314 “<code>application/octet-stream</code>”
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2315 MIME type for all requests, try the following:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2316 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2317 location /download/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2318 types { }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2319 default_type application/octet-stream;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2320 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2321 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2322 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2323
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2324 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2325
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2326
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2327 <directive name="types_hash_bucket_size">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2328 <syntax><argument>size</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2329 <default>32|64|128</default>
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2330 <context>http</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2331 <context>server</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2332 <context>location</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2333
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2334 <para>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2335 Sets the bucket size for the types hash tables.
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2336 Default value depends on the size of the processor's cache line.
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2337 For more information, please refer to
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2338 <link doc="../hash.xml">Setting Up Hashes</link>.
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2339 </para>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2340
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2341 </directive>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2342
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2343
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2344 <directive name="types_hash_max_size">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2345 <syntax><argument>size</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2346 <default>1024</default>
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2347 <context>http</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2348 <context>server</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2349 <context>location</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2350
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2351 <para>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2352 Sets the maximum <argument>size</argument> of the types hash tables.
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2353 For more information, please refer to
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2354 <link doc="../hash.xml">Setting Up Hashes</link>.
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2355 </para>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2356
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2357 </directive>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2358
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2359
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2360 <directive name="underscores_in_headers">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2361 <syntax><value>on</value> | <value>off</value></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2362 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2363 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2364 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2365
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2366 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2367 Enables or disables the use of underscores in client request header fields.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2368 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2369
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2370 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2371
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2372
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2373 <directive name="variables_hash_bucket_size">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2374 <syntax><argument>size</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2375 <default>64</default>
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2376 <context>http</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2377
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2378 <para>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2379 Sets the bucket size for the variables hash table.
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2380 For more information, please refer to
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2381 <link doc="../hash.xml">Setting Up Hashes</link>.
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2382 </para>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2383
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2384 </directive>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2385
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2386
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2387 <directive name="variables_hash_max_size">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2388 <syntax><argument>size</argument></syntax>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2389 <default>512</default>
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2390 <context>http</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2391
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2392 <para>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2393 Sets the maximum <argument>size</argument> of the variables hash table.
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2394 For more information, please refer to
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2395 <link doc="../hash.xml">Setting Up Hashes</link>.
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2396 </para>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2397
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2398 </directive>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2399
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2400 </section>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2401
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2402 <section id="variables" name="Embedded Variables">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2403
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2404 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2405 The module <code>ngx_http_core_module</code> supports embedded variables with
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2406 names matching those of the Apache Server.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2407 First of all, these are variables representing client request header
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2408 fields, such as <var>$http_user_agent</var>, <var>$http_cookie</var>,
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2409 and so on.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2410 It also supports other variables:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2411 <list type="tag">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2412
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2413 <tag-name><var>$arg_</var><argument>name</argument></tag-name>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2414 <tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2415 argument <argument>name</argument> in the request line
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2416 </tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2417
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2418 <tag-name><var>$args</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2419 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2420 arguments in the request line
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2421 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2422
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2423 <tag-name><var>$binary_remote_addr</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2424 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2425 client address in a binary form, value's length is always 4 bytes
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2426 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2427
86
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2428 <tag-name><var>$body_bytes_sent</var></tag-name>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2429 <tag-desc>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2430 number of bytes sent to a client, not counting the response header
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2431 </tag-desc>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2432
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2433 <tag-name><var>$content_length</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2434 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2435 <header>Content-Length</header> request header field
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2436 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2437
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2438 <tag-name><var>$content_type</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2439 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2440 <header>Content-Type</header> request header field
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2441 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2442
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2443 <tag-name><var>$cookie_</var><argument>name</argument></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2444 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2445 the <argument>name</argument> cookie
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2446 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2447
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2448 <tag-name><var>$document_root</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2449 <tag-desc>
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
2450 <link id="root"/> directive's value for the current request
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2451 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2452
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2453 <tag-name><var>$document_uri</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2454 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2455 same as <var>$uri</var>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2456 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2457
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2458 <tag-name><var>$host</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2459 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2460 <header>Host</header> request header field,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2461 or the server name matching a request if this field is not present
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2462 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2463
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2464 <tag-name><var>$hostname</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2465 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2466 host name
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2467 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2468
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2469 <tag-name><var>$http_</var><argument>name</argument></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2470 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2471 the <argument>name</argument> request header field
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2472 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2473
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2474 <tag-name><var>$is_args</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2475 <tag-desc>
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
2476 “<code>?</code>” if a request line has arguments,
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2477 or an empty string otherwise
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2478 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2479
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2480 <tag-name><var>$limit_rate</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2481 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2482 allows for connection rate limiting
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2483 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2484
86
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2485 <tag-name><var>$nginx_version</var></tag-name>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2486 <tag-desc>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2487 nginx version
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2488 </tag-desc>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2489
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2490 <tag-name><var>$pid</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2491 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2492 PID of the worker process
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2493 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2494
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2495 <tag-name><var>$query_string</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2496 <tag-desc>
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2497 same as <var>$args</var>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2498 </tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2499
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2500 <tag-name><var>$realpath_root</var></tag-name>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2501 <tag-desc>
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
2502 <link id="root"/> directive's value
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2503 for the current request, with all symbolic links resolved to real paths
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2504 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2505
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2506 <tag-name><var>$remote_addr</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2507 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2508 client address
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2509 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2510
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2511 <tag-name><var>$remote_port</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2512 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2513 client port
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2514 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2515
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2516 <tag-name><var>$remote_user</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2517 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2518 user name supplied with the Basic authentication
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2519 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2520
86
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2521 <tag-name><var>$request</var></tag-name>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2522 <tag-desc>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2523 full original request line
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2524 </tag-desc>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2525
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2526 <tag-name><var>$request_body</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2527 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2528 request body
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2529 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2530 The variable's value is made available in locations
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2531 processed by the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
2532 <link doc="ngx_http_proxy_module.xml" id="proxy_pass"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2533 and
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
2534 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2535 directives.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2536 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2537 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2538
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2539 <tag-name><var>$request_body_file</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2540 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2541 name of a temporary file with the request body
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2542 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2543 At the end of processing, the file needs to be removed.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2544 To always write a request body to a file,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2545 <link id="client_body_in_file_only">client_body_in_file_only on</link>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2546 needs be specified.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2547 When passing the name of a temporary file in a proxied request,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2548 or in a request to a FastCGI server,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2549 passing of the request body should be disabled by the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
2550 <link doc="ngx_http_proxy_module.xml" id="proxy_pass_request_body"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2551 and
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
2552 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass_request_body"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2553 directives, respectively.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2554 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2555 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2556
88
6876e2558d09 Spell checking.
Ruslan Ermilov <ru@nginx.com>
parents: 86
diff changeset
2557 <tag-name><var>$request_completion</var></tag-name>
6876e2558d09 Spell checking.
Ruslan Ermilov <ru@nginx.com>
parents: 86
diff changeset
2558 <tag-desc>
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
2559 “<code>OK</code>” if a request has completed,
88
6876e2558d09 Spell checking.
Ruslan Ermilov <ru@nginx.com>
parents: 86
diff changeset
2560 or an empty string otherwise
6876e2558d09 Spell checking.
Ruslan Ermilov <ru@nginx.com>
parents: 86
diff changeset
2561 </tag-desc>
6876e2558d09 Spell checking.
Ruslan Ermilov <ru@nginx.com>
parents: 86
diff changeset
2562
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2563 <tag-name><var>$request_filename</var></tag-name>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2564 <tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2565 file path for the current query, based on the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
2566 <link id="root"/> and <link id="alias"/>
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2567 directives, and the request URI
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2568 </tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2569
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2570 <tag-name><var>$request_method</var></tag-name>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2571 <tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2572 request method, usually
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
2573 “<code>GET</code>” or “<code>POST</code>”
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2574 </tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2575
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2576 <tag-name><var>$request_uri</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2577 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2578 full original request URI (with arguments)
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2579 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2580
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2581 <tag-name><var>$scheme</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2582 <tag-desc>
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
2583 request scheme, “<code>http</code>” or “<code>https</code>”
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2584 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2585
86
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2586 <tag-name><var>$sent_http_</var><argument>name</argument></tag-name>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2587 <tag-desc>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2588 the <argument>name</argument> response header field
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2589 </tag-desc>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2590
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2591 <tag-name><var>$server_addr</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2592 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2593 an address of the server which accepted a request
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2594 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2595 Computing a value of this variable usually requires one system call.
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
2596 To avoid a system call, the <link id="listen"/> directives
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2597 must specify addresses and use the <parameter>bind</parameter> parameter
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2598 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2599 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2600
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2601 <tag-name><var>$server_name</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2602 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2603 name of the server which accepted a request
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2604 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2605
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2606 <tag-name><var>$server_port</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2607 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2608 port of the server which accepted a request
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2609 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2610
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2611 <tag-name><var>$server_protocol</var></tag-name>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2612 <tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2613 request protocol, usually
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
2614 “<code>HTTP/1.0</code>”
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2615 or
147
8057b7793bd9 Removed the "dq" element.
Ruslan Ermilov <ru@nginx.com>
parents: 143
diff changeset
2616 “<code>HTTP/1.1</code>”
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2617 </tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2618
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2619 <tag-name><var>$uri</var></tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2620 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2621 current URI in request
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2622 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2623 It may differ from an original, e.g. when doing internal redirects,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2624 or when using index files.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2625 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2626 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2627
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2628 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2629 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2630
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2631 </section>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2632
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2633 </module>