annotate xml/en/docs/http/ngx_http_core_module.xml @ 2956:a85e4d126bc7

Updated docs for the upcoming NGINX Plus release.
author Yaroslav Zhuravlev <yar@nginx.com>
date Tue, 02 May 2023 11:39:21 +0100
parents 547303412ab9
children 23eedf89fd5d
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
580
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 576
diff changeset
3 <!--
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 576
diff changeset
4 Copyright (C) Igor Sysoev
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 576
diff changeset
5 Copyright (C) Nginx, Inc.
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 576
diff changeset
6 -->
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 576
diff changeset
7
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
9
89
f451dc5c5c82 Module names corrected.
Ruslan Ermilov <ru@nginx.com>
parents: 88
diff changeset
10 <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
11 link="/en/docs/http/ngx_http_core_module.html"
589
764fbac1b8b4 Added document revision.
Ruslan Ermilov <ru@nginx.com>
parents: 587
diff changeset
12 lang="en"
2921
52ea1f45b324 Clarified "if_modified_since off" behaviour (ticket #2176).
Maxim Dounin <mdounin@mdounin.ru>
parents: 2912
diff changeset
13 rev="103">
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
14
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
15 <section id="directives" name="Directives">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
16
1879
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
17 <directive name="absolute_redirect">
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
18 <syntax><literal>on</literal> | <literal>off</literal></syntax>
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
19 <default>on</default>
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
20 <context>http</context>
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
21 <context>server</context>
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
22 <context>location</context>
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
23 <appeared-in>1.11.8</appeared-in>
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
24
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
25 <para>
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
26 If disabled, redirects issued by nginx will be relative.
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
27 </para>
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
28
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
29 <para>
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
30 See also <link id="server_name_in_redirect"/>
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
31 and <link id="port_in_redirect"/> directives.
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
32 </para>
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
33
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
34 </directive>
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
35
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
36
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
37 <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
38 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
39 <literal>on</literal> |
1436
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
40 <literal>off</literal> |
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
41 <literal>threads</literal>[<literal>=</literal><value>pool</value>]</syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
42 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
43 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
44 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
45 <context>location</context>
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
46 <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
47
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
48 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
49 Enables or disables the use of asynchronous file I/O (AIO)
1432
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
50 on FreeBSD and Linux:
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
51 <example>
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
52 location /video/ {
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
53 aio on;
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
54 output_buffers 1 64k;
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
55 }
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
56 </example>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
57 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
58
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
59 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
60 On FreeBSD, AIO can be used starting from FreeBSD&nbsp;4.3.
1859
5cd4964fbc5f Updated AIO description for FreeBSD 11.0 and upwards.
Sergey Kandaurov <pluknet@nginx.com>
parents: 1827
diff changeset
61 Prior to FreeBSD&nbsp;11.0,
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
62 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
63 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
64 options VFS_AIO
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
65 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
66 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
67 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
68 kldload aio
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
69 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
70 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
71
1430
0eb8e261f349 AIO: clarified the use of both AIO and sendfile on Linux.
Ruslan Ermilov <ru@nginx.com>
parents: 1414
diff changeset
72 <!--
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
73 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
74 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
75 when booting the kernel, will cause the entire networking subsystem
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
76 to use the Giant lock, which can impact overall performance negatively.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
77 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
78 FreeBSD&nbsp;7.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
79 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
80 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
81 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
82 after the kernel has booted.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
83 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
84 <path>/var/log/messages</path>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
85 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
86 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
87 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
88 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
89 and can safely be ignored.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
90 <note>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
91 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
92 fact that FreeBSD supports asynchronous calls
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
93 <c-func>aio_read</c-func>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
94 and
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
95 <c-func>aio_write</c-func>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
96 when working with sockets.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
97 However, since nginx uses AIO only for disk I/O, no problems should arise.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
98 </note>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
99 </para>
1430
0eb8e261f349 AIO: clarified the use of both AIO and sendfile on Linux.
Ruslan Ermilov <ru@nginx.com>
parents: 1414
diff changeset
100 -->
57
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>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
103 On Linux, AIO can be used starting from kernel version 2.6.22.
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
104 Also, it is 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"/>,
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
106 or otherwise reading will be blocking:
57
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).
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
121 File’s unaligned end is read in blocking mode.
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
122 The same holds true for byte range requests and for FLV requests
57
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.
1430
0eb8e261f349 AIO: clarified the use of both AIO and sendfile on Linux.
Ruslan Ermilov <ru@nginx.com>
parents: 1414
diff changeset
125 </para>
0eb8e261f349 AIO: clarified the use of both AIO and sendfile on Linux.
Ruslan Ermilov <ru@nginx.com>
parents: 1414
diff changeset
126
0eb8e261f349 AIO: clarified the use of both AIO and sendfile on Linux.
Ruslan Ermilov <ru@nginx.com>
parents: 1414
diff changeset
127 <para>
0eb8e261f349 AIO: clarified the use of both AIO and sendfile on Linux.
Ruslan Ermilov <ru@nginx.com>
parents: 1414
diff changeset
128 When both AIO and <link id="sendfile"/> are enabled on Linux,
0eb8e261f349 AIO: clarified the use of both AIO and sendfile on Linux.
Ruslan Ermilov <ru@nginx.com>
parents: 1414
diff changeset
129 AIO is used for files that are larger than or equal to
0eb8e261f349 AIO: clarified the use of both AIO and sendfile on Linux.
Ruslan Ermilov <ru@nginx.com>
parents: 1414
diff changeset
130 the size specified in the <link id="directio"/> directive,
0eb8e261f349 AIO: clarified the use of both AIO and sendfile on Linux.
Ruslan Ermilov <ru@nginx.com>
parents: 1414
diff changeset
131 while <link id="sendfile"/> is used for files of smaller sizes
0eb8e261f349 AIO: clarified the use of both AIO and sendfile on Linux.
Ruslan Ermilov <ru@nginx.com>
parents: 1414
diff changeset
132 or when <link id="directio"/> is disabled.
0eb8e261f349 AIO: clarified the use of both AIO and sendfile on Linux.
Ruslan Ermilov <ru@nginx.com>
parents: 1414
diff changeset
133 <example>
0eb8e261f349 AIO: clarified the use of both AIO and sendfile on Linux.
Ruslan Ermilov <ru@nginx.com>
parents: 1414
diff changeset
134 location /video/ {
0eb8e261f349 AIO: clarified the use of both AIO and sendfile on Linux.
Ruslan Ermilov <ru@nginx.com>
parents: 1414
diff changeset
135 sendfile on;
0eb8e261f349 AIO: clarified the use of both AIO and sendfile on Linux.
Ruslan Ermilov <ru@nginx.com>
parents: 1414
diff changeset
136 aio on;
0eb8e261f349 AIO: clarified the use of both AIO and sendfile on Linux.
Ruslan Ermilov <ru@nginx.com>
parents: 1414
diff changeset
137 directio 8m;
0eb8e261f349 AIO: clarified the use of both AIO and sendfile on Linux.
Ruslan Ermilov <ru@nginx.com>
parents: 1414
diff changeset
138 }
0eb8e261f349 AIO: clarified the use of both AIO and sendfile on Linux.
Ruslan Ermilov <ru@nginx.com>
parents: 1414
diff changeset
139 </example>
57
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
1432
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
142 <para>
1436
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
143 Finally, files can be read and <link id="sendfile">sent</link>
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
144 using multi-threading (1.7.11),
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
145 without blocking a worker process:
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
146 <example>
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
147 location /video/ {
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
148 sendfile on;
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
149 aio threads;
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
150 }
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
151 </example>
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
152 Read and send file operations are offloaded to threads of the specified
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
153 <link doc="../ngx_core_module.xml" id="thread_pool">pool</link>.
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
154 If the pool name is omitted,
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
155 the pool with the name “<literal>default</literal>” is used.
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
156 The pool name can also be set with variables:
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
157 <example>
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
158 aio threads=pool$disk;
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
159 </example>
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
160 By default, multi-threading is disabled, it should be
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
161 enabled with the
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
162 <literal>--with-threads</literal> configuration parameter.
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
163 Currently, multi-threading is compatible only with the
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
164 <link doc="../events.xml" id="epoll"/>,
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
165 <link doc="../events.xml" id="kqueue"/>,
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
166 and
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
167 <link doc="../events.xml" id="eventport"/> methods.
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
168 Multi-threaded sending of files is only supported on Linux.
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
169 </para>
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
170
2333e08e277d Documented thread pools.
Ruslan Ermilov <ru@nginx.com>
parents: 1432
diff changeset
171 <para>
1432
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
172 See also the <link id="sendfile"/> directive.
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
173 </para>
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
174
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
175 </directive>
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
1664
1a05fd32dca8 Documented the "aio_write" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1636
diff changeset
178 <directive name="aio_write">
1a05fd32dca8 Documented the "aio_write" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1636
diff changeset
179 <syntax><literal>on</literal> | <literal>off</literal></syntax>
1a05fd32dca8 Documented the "aio_write" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1636
diff changeset
180 <default>off</default>
1a05fd32dca8 Documented the "aio_write" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1636
diff changeset
181 <context>http</context>
1a05fd32dca8 Documented the "aio_write" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1636
diff changeset
182 <context>server</context>
1a05fd32dca8 Documented the "aio_write" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1636
diff changeset
183 <context>location</context>
1a05fd32dca8 Documented the "aio_write" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1636
diff changeset
184 <appeared-in>1.9.13</appeared-in>
1a05fd32dca8 Documented the "aio_write" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1636
diff changeset
185
1a05fd32dca8 Documented the "aio_write" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1636
diff changeset
186 <para>
1a05fd32dca8 Documented the "aio_write" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1636
diff changeset
187 If <link id="aio"/> is enabled, specifies whether it is used for writing files.
1665
57b53a0818df Slightly paraphrased aio_write description for better perception.
Ruslan Ermilov <ru@nginx.com>
parents: 1664
diff changeset
188 Currently, this only works when using
1664
1a05fd32dca8 Documented the "aio_write" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1636
diff changeset
189 <literal>aio threads</literal>
1665
57b53a0818df Slightly paraphrased aio_write description for better perception.
Ruslan Ermilov <ru@nginx.com>
parents: 1664
diff changeset
190 and is limited to writing temporary files
57b53a0818df Slightly paraphrased aio_write description for better perception.
Ruslan Ermilov <ru@nginx.com>
parents: 1664
diff changeset
191 with data received from proxied servers.
1664
1a05fd32dca8 Documented the "aio_write" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1636
diff changeset
192 </para>
1a05fd32dca8 Documented the "aio_write" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1636
diff changeset
193
1a05fd32dca8 Documented the "aio_write" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1636
diff changeset
194 </directive>
1a05fd32dca8 Documented the "aio_write" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1636
diff changeset
195
1a05fd32dca8 Documented the "aio_write" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1636
diff changeset
196
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
197 <directive name="alias">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
198 <syntax><value>path</value></syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
199 <default/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
200 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
201
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
202 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
203 Defines a replacement for the specified location.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
204 For example, with the following configuration
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
205 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
206 location /i/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
207 alias /data/w3/images/;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
208 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
209 </example>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
210 on request of
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
211 “<literal>/i/top.gif</literal>”, the file
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
212 <path>/data/w3/images/top.gif</path> will be sent.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
213 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
214
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
215 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
216 The <value>path</value> value can contain variables,
65
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
217 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
218 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
219
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
220 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
221 If <literal>alias</literal> is used inside a location defined
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
222 with a regular expression then such regular expression should
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
223 contain captures and <literal>alias</literal> should refer to
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
224 these captures (0.7.40), for example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
225 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
226 location ~ ^/users/(.+\.(?:gif|jpe?g|png))$ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
227 alias /data/w3/images/$1;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
228 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
229 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
230 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
231
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
232 <para>
625
af3f38e349eb Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents: 617
diff changeset
233 When location matches the last part of the directive’s value:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
234 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
235 location /images/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
236 alias /data/w3/images/;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
237 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
238 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
239 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
240 <link id="root"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
241 directive instead:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
242 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
243 location /images/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
244 root /data/w3;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
245 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
246 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
247 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
248
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
249 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
250
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
251
2523
2bb06b3fbcc5 Documented the "auth_delay" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2458
diff changeset
252 <directive name="auth_delay">
2bb06b3fbcc5 Documented the "auth_delay" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2458
diff changeset
253 <syntax><value>time</value></syntax>
2bb06b3fbcc5 Documented the "auth_delay" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2458
diff changeset
254 <default>0s</default>
2bb06b3fbcc5 Documented the "auth_delay" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2458
diff changeset
255 <context>http</context>
2bb06b3fbcc5 Documented the "auth_delay" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2458
diff changeset
256 <context>server</context>
2bb06b3fbcc5 Documented the "auth_delay" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2458
diff changeset
257 <context>location</context>
2bb06b3fbcc5 Documented the "auth_delay" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2458
diff changeset
258 <appeared-in>1.17.10</appeared-in>
2bb06b3fbcc5 Documented the "auth_delay" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2458
diff changeset
259
2bb06b3fbcc5 Documented the "auth_delay" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2458
diff changeset
260 <para>
2bb06b3fbcc5 Documented the "auth_delay" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2458
diff changeset
261 Delays processing of unauthorized requests with 401 response code
2bb06b3fbcc5 Documented the "auth_delay" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2458
diff changeset
262 to prevent timing attacks when access is limited by
2bb06b3fbcc5 Documented the "auth_delay" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2458
diff changeset
263 <link doc="ngx_http_auth_basic_module.xml">password</link>, by the
2bb06b3fbcc5 Documented the "auth_delay" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2458
diff changeset
264 <link doc="ngx_http_auth_request_module.xml">result of subrequest</link>,
2bb06b3fbcc5 Documented the "auth_delay" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2458
diff changeset
265 or by <link doc="ngx_http_auth_jwt_module.xml">JWT</link>.
2bb06b3fbcc5 Documented the "auth_delay" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2458
diff changeset
266 </para>
2bb06b3fbcc5 Documented the "auth_delay" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2458
diff changeset
267
2bb06b3fbcc5 Documented the "auth_delay" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2458
diff changeset
268 </directive>
2bb06b3fbcc5 Documented the "auth_delay" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2458
diff changeset
269
2bb06b3fbcc5 Documented the "auth_delay" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2458
diff changeset
270
162
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
271 <directive name="chunked_transfer_encoding">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
272 <syntax><literal>on</literal> | <literal>off</literal></syntax>
162
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
273 <default>on</default>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
274 <context>http</context>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
275 <context>server</context>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
276 <context>location</context>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
277
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
278 <para>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
279 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
280 It may come in handy when using a software failing to support
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
281 chunked encoding despite the standard’s requirement.
162
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
282 </para>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
283
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
284 </directive>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
285
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
286
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
287 <directive name="client_body_buffer_size">
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
288
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
289 <syntax><value>size</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
290 <default>8k|16k</default>
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
291 <context>http</context>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
292 <context>server</context>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
293 <context>location</context>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
294
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
295 <para>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
296 Sets buffer size for reading client request body.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
297 In case the request body is larger than the buffer,
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
298 the whole body or only its part is written to a
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
299 <link id="client_body_temp_path">temporary file</link>.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
300 By default, buffer size is equal to two memory pages.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
301 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
302 It is usually 16K on other 64-bit platforms.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
303 </para>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
304
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
305 </directive>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
306
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
307
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
308 <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
309 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
310 <literal>on</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
311 <literal>clean</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
312 <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
313 <default>off</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 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
320 into a file.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
321 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
322 <var>$request_body_file</var>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
323 variable, or the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
324 <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
325 method of the module
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
326 <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
327 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
328
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
329 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
330 When set to the value <literal>on</literal>, temporary files are not
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
331 removed after request processing.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
332 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
333
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
334 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
335 The value <literal>clean</literal> will cause the temporary files
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
336 left after request processing to be removed.
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
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
339 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
340
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
341
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
342 <directive name="client_body_in_single_buffer">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
343 <syntax><literal>on</literal> | <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
344 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
345 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
346 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
347 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
348
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
349 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
350 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
351 in a single buffer.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
352 The directive is recommended when using the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
353 <var>$request_body</var>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
354 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
355 </para>
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 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
358
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
359
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
360 <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
361 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
362 <value>path</value>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
363 [<value>level1</value>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
364 [<value>level2</value>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
365 [<value>level3</value>]]]</syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
366 <default>client_body_temp</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
367 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
368 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
369 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
370
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
371 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
372 Defines a directory for storing temporary files holding client request bodies.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
373 Up to three-level subdirectory hierarchy can be used under the specified
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
374 directory.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
375 For example, in the following configuration
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
376 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
377 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
378 </example>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
379 a path to a temporary file might look like this:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
380 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
381 /spool/nginx/client_temp/7/45/00000123457
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
382 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
383 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
384
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
385 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
386
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
387
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
388 <directive name="client_body_timeout">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
389 <syntax><value>time</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
390 <default>60s</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
391 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
392 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
393 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
394
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
395 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
396 Defines a timeout for reading client request body.
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 958
diff changeset
397 The timeout is set only for a period between two successive read operations,
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
398 not for the transmission of the whole request body.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
399 If a client does not transmit anything within this time, the
2220
896562a1ccde Fixed description of client_header_timeout and client_body_timeout.
Sergey Kandaurov <pluknet@nginx.com>
parents: 2206
diff changeset
400 request is terminated with the
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
401 <http-status code="408" text="Request Time-out"/>
2220
896562a1ccde Fixed description of client_header_timeout and client_body_timeout.
Sergey Kandaurov <pluknet@nginx.com>
parents: 2206
diff changeset
402 error.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
403 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
404
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
405 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
406
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
407
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
408 <directive name="client_header_buffer_size">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
409 <syntax><value>size</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
410 <default>1k</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
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
414 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
415 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
416 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
417 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
418 it may not fit into 1K.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
419 If a request line or a request header field does not fit into
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
420 this buffer then larger buffers, configured by the
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
421 <link id="large_client_header_buffers"/> directive,
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
422 are allocated.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
423 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
424
2795
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
425 <para>
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
426 If the directive is specified on the <link id="server"/> level,
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
427 the value from the default server can be used.
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
428 Details are provided in the
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
429 “<link doc="server_names.xml" id="virtual_server_selection">Virtual
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
430 server selection</link>” section.
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
431 </para>
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
432
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
433 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
434
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
435
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
436 <directive name="client_header_timeout">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
437 <syntax><value>time</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
438 <default>60s</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
439 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
440 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
441
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
442 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
443 Defines a timeout for reading client request header.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
444 If a client does not transmit the entire header within this time, the
2220
896562a1ccde Fixed description of client_header_timeout and client_body_timeout.
Sergey Kandaurov <pluknet@nginx.com>
parents: 2206
diff changeset
445 request is terminated with the
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
446 <http-status code="408" text="Request Time-out"/>
2220
896562a1ccde Fixed description of client_header_timeout and client_body_timeout.
Sergey Kandaurov <pluknet@nginx.com>
parents: 2206
diff changeset
447 error.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
448 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
449
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
450 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
451
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
452
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
453 <directive name="client_max_body_size">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
454 <syntax><value>size</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
455 <default>1m</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
456 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
457 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
458 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
459
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
460 <para>
2657
679fb7712ab4 Updated client_max_body_size for chunked encoding and HTTP/2.
Sergey Kandaurov <pluknet@nginx.com>
parents: 2593
diff changeset
461 Sets the maximum allowed size of the client request body.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
462 If the size in a request exceeds the configured value, the
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
463 <http-status code="413" text="Request Entity Too Large"/>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
464 error is returned to the client.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
465 Please be aware that
237
48a5c2083270 For now, commented out broken link to /web/upload.html.
Ruslan Ermilov <ru@nginx.com>
parents: 236
diff changeset
466 <!--link doc="/web/upload.xml"-->browsers cannot correctly display
48a5c2083270 For now, commented out broken link to /web/upload.html.
Ruslan Ermilov <ru@nginx.com>
parents: 236
diff changeset
467 this error<!--/link-->.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
468 Setting <value>size</value> to 0 disables checking of client
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
469 request body size.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
470 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
471
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
472 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
473
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
474
161
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
475 <directive name="connection_pool_size">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
476 <syntax><value>size</value></syntax>
1619
88ad8fcea975 Changed default value of connection_pool_size.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1614
diff changeset
477 <default>256|512</default>
161
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
478 <context>http</context>
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
479 <context>server</context>
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
480
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
481 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
482 Allows accurate tuning of per-connection memory allocations.
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
483 This directive has minimal impact on performance
161
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
484 and should not generally be used.
1619
88ad8fcea975 Changed default value of connection_pool_size.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1614
diff changeset
485 By default, the size is equal to
88ad8fcea975 Changed default value of connection_pool_size.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1614
diff changeset
486 256 bytes on 32-bit platforms and 512 bytes on 64-bit platforms.
88ad8fcea975 Changed default value of connection_pool_size.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1614
diff changeset
487 <note>
88ad8fcea975 Changed default value of connection_pool_size.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1614
diff changeset
488 Prior to version 1.9.8, the default value was 256 on all platforms.
88ad8fcea975 Changed default value of connection_pool_size.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1614
diff changeset
489 </note>
161
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
490 </para>
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
491
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
492 </directive>
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
493
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
494
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
495 <directive name="default_type">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
496 <syntax><value>mime-type</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
497 <default>text/plain</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
498 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
499 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
500 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
501
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
502 <para>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 958
diff changeset
503 Defines the default MIME type of a response.
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
504 Mapping of file name extensions to MIME types can be set
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
505 with the <link id="types"/> directive.
57
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
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
508 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
509
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
510
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
511 <directive name="directio">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
512 <syntax><value>size</value> | <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
513 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
514 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
515 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
516 <context>location</context>
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
517 <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
518
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
519 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
520 Enables the use of
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
521 the <c-def>O_DIRECT</c-def> flag (FreeBSD, Linux),
1911
f024ac0ec5c7 Apple rebranded Mac OS X to macOS.
Sergey Kandaurov <pluknet@nginx.com>
parents: 1904
diff changeset
522 the <c-def>F_NOCACHE</c-def> flag (macOS),
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
523 or the <c-func>directio</c-func> function (Solaris),
236
9ba4f5333a56 Fixed off-by-one error introduced during an initial translation into English.
Ruslan Ermilov <ru@nginx.com>
parents: 235
diff changeset
524 when reading files that are larger than or equal to
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
525 the specified <value>size</value>.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
526 The directive 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
527 <link id="sendfile"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
528 for a given request.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
529 It can be useful for serving large files:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
530 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
531 directio 4m;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
532 </example>
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
533 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
534 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
535
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
536 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
537
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
538
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
539 <directive name="directio_alignment">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
540 <syntax><value>size</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
541 <default>512</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
542 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
543 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
544 <context>location</context>
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
545 <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
546
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
547 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
548 Sets the 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
549 <link id="directio"/>.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
550 In most cases, a 512-byte alignment is enough.
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
551 However, when using XFS under Linux, it needs to be increased to 4K.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
552 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
553
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
554 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
555
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
556
418
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
557 <directive name="disable_symlinks">
436
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
558 <syntax><literal>off</literal></syntax>
418
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
559 <syntax>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
560 <literal>on</literal> |
436
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
561 <literal>if_not_owner</literal>
438
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
562 [<literal>from</literal>=<value>part</value>]</syntax>
418
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
563 <default>off</default>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
564 <context>http</context>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
565 <context>server</context>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
566 <context>location</context>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
567 <appeared-in>1.1.15</appeared-in>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
568
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
569 <para>
436
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
570 Determines how symbolic links should be treated when opening files:
418
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
571 <list type="tag">
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
572
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
573 <tag-name><literal>off</literal></tag-name>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
574 <tag-desc>
436
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
575 Symbolic links in the pathname are allowed and not checked.
418
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
576 This is the default behavior.
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
577 </tag-desc>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
578
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
579 <tag-name><literal>on</literal></tag-name>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
580 <tag-desc>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
581 If any component of the pathname is a symbolic link,
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
582 access to a file is denied.
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
583 </tag-desc>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
584
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
585 <tag-name><literal>if_not_owner</literal></tag-name>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
586 <tag-desc>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
587 Access to a file is denied if any component of the pathname
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
588 is a symbolic link, and the link and object that the link
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
589 points to have different owners.
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
590 </tag-desc>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
591
438
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
592 <tag-name><literal>from</literal>=<value>part</value></tag-name>
436
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
593 <tag-desc>
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
594 When checking symbolic links
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
595 (parameters <literal>on</literal> and <literal>if_not_owner</literal>),
438
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
596 all components of the pathname are normally checked.
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
597 Checking of symbolic links in the initial part of the pathname
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
598 may be avoided by specifying additionally the
438
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
599 <literal>from</literal>=<value>part</value> parameter.
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
600 In this case, symbolic links are checked only from
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
601 the pathname component that follows the specified initial part.
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
602 If the value is not an initial part of the pathname checked, the whole
436
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
603 pathname is checked as if this parameter was not specified at all.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
604 If the value matches the whole file name,
438
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
605 symbolic links are not checked.
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
606 The parameter value can contain variables.
436
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
607 </tag-desc>
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
608
418
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
609 </list>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
610 </para>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
611
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
612 <para>
436
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
613 Example:
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
614 <example>
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
615 disable_symlinks on from=$document_root;
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
616 </example>
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
617 </para>
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
618
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
619 <para>
418
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
620 This directive is only available on systems that have the
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
621 <c-func>openat</c-func> and <c-func>fstatat</c-func> interfaces.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
622 Such systems include modern versions of FreeBSD, Linux, and Solaris.
418
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
623 </para>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
624
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
625 <para>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
626 Parameters <literal>on</literal> and <literal>if_not_owner</literal>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
627 add a processing overhead.
436
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
628 <note>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
629 On systems that do not support opening of directories only for search,
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
630 to use these parameters it is required that worker processes
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
631 have read permissions for all directories being checked.
438
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
632 </note>
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
633 </para>
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
634
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
635 <para>
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
636 <note>
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
637 The
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
638 <link doc="ngx_http_autoindex_module.xml">ngx_http_autoindex_module</link>,
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
639 <link doc="ngx_http_random_index_module.xml">ngx_http_random_index_module</link>,
477
c5680571ec09 Unnecessary extensions removed from links.
Andrey Belov <defan@nginx.com>
parents: 476
diff changeset
640 and <link doc="ngx_http_dav_module.xml">ngx_http_dav_module</link>
438
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
641 modules currently ignore this directive.
436
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
642 </note>
418
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
643 </para>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
644
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
645 </directive>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
646
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
647
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
648 <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
649 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
650 <value>code</value> ...
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
651 [<literal>=</literal>[<value>response</value>]]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
652 <value>uri</value></syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
653 <default/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
654 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
655 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
656 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
657 <context>if in location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
658
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
659 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
660 Defines the URI that will be shown for the specified errors.
1826
da6a3e401b26 Slightly reformatted the error_page description.
Ruslan Ermilov <ru@nginx.com>
parents: 1770
diff changeset
661 A <value>uri</value> value can contain variables.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
662 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
663
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
664 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
665 Example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
666 <example>
711
1f383a8bccdb Minor improvements over the recent additions to the "error_page" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 709
diff changeset
667 error_page 404 /404.html;
1f383a8bccdb Minor improvements over the recent additions to the "error_page" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 709
diff changeset
668 error_page 500 502 503 504 /50x.html;
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
669 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
670 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
671
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
672 <para>
1827
64e2b8c5200d Documented request method change by error_page in /uri redirection.
Ruslan Ermilov <ru@nginx.com>
parents: 1826
diff changeset
673 This causes an internal redirect to the specified <value>uri</value>
64e2b8c5200d Documented request method change by error_page in /uri redirection.
Ruslan Ermilov <ru@nginx.com>
parents: 1826
diff changeset
674 with the client request method changed to “<literal>GET</literal>”
64e2b8c5200d Documented request method change by error_page in /uri redirection.
Ruslan Ermilov <ru@nginx.com>
parents: 1826
diff changeset
675 (for all methods other than
64e2b8c5200d Documented request method change by error_page in /uri redirection.
Ruslan Ermilov <ru@nginx.com>
parents: 1826
diff changeset
676 “<literal>GET</literal>” and “<literal>HEAD</literal>”).
64e2b8c5200d Documented request method change by error_page in /uri redirection.
Ruslan Ermilov <ru@nginx.com>
parents: 1826
diff changeset
677 </para>
64e2b8c5200d Documented request method change by error_page in /uri redirection.
Ruslan Ermilov <ru@nginx.com>
parents: 1826
diff changeset
678
64e2b8c5200d Documented request method change by error_page in /uri redirection.
Ruslan Ermilov <ru@nginx.com>
parents: 1826
diff changeset
679 <para>
679
9888364847b7 Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents: 674
diff changeset
680 Furthermore, it is possible to change the response code to another
711
1f383a8bccdb Minor improvements over the recent additions to the "error_page" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 709
diff changeset
681 using the “<literal>=</literal><value>response</value>” syntax, for example:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
682 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
683 error_page 404 =200 /empty.gif;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
684 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
685 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
686
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
687 <para>
1194
9264fdb6c833 Added links to uwsgi.
Ruslan Ermilov <ru@nginx.com>
parents: 1181
diff changeset
688 If an error response is processed by a proxied server
2134
4cafd82e5007 Added info about gRPC to various modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2125
diff changeset
689 or a FastCGI/uwsgi/SCGI/gRPC server,
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
690 and the server may return different response codes (e.g., 200, 302, 401
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
691 or 404), it is possible to respond with the code it returns:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
692 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
693 error_page 404 = /404.php;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
694 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
695 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
696
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
697 <para>
1827
64e2b8c5200d Documented request method change by error_page in /uri redirection.
Ruslan Ermilov <ru@nginx.com>
parents: 1826
diff changeset
698 If there is no need to change URI and method during internal redirection
64e2b8c5200d Documented request method change by error_page in /uri redirection.
Ruslan Ermilov <ru@nginx.com>
parents: 1826
diff changeset
699 it is possible to pass error processing into a named location:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
700 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
701 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
702 error_page 404 = @fallback;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
703 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
704
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
705 location @fallback {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
706 proxy_pass http://backend;
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 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
709 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
710
679
9888364847b7 Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents: 674
diff changeset
711 <para>
9888364847b7 Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents: 674
diff changeset
712 <note>
1826
da6a3e401b26 Slightly reformatted the error_page description.
Ruslan Ermilov <ru@nginx.com>
parents: 1770
diff changeset
713 If <value>uri</value> processing leads to an error,
747
ddec437b692b Fixed a number of typos.
Vladimir Homutov <vl@nginx.com>
parents: 741
diff changeset
714 the status code of the last occurred error is returned to the client.
679
9888364847b7 Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents: 674
diff changeset
715 </note>
9888364847b7 Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents: 674
diff changeset
716 </para>
9888364847b7 Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents: 674
diff changeset
717
1826
da6a3e401b26 Slightly reformatted the error_page description.
Ruslan Ermilov <ru@nginx.com>
parents: 1770
diff changeset
718 <para>
da6a3e401b26 Slightly reformatted the error_page description.
Ruslan Ermilov <ru@nginx.com>
parents: 1770
diff changeset
719 It is also possible to use URL redirects for error processing:
da6a3e401b26 Slightly reformatted the error_page description.
Ruslan Ermilov <ru@nginx.com>
parents: 1770
diff changeset
720 <example>
da6a3e401b26 Slightly reformatted the error_page description.
Ruslan Ermilov <ru@nginx.com>
parents: 1770
diff changeset
721 error_page 403 http://example.com/forbidden.html;
da6a3e401b26 Slightly reformatted the error_page description.
Ruslan Ermilov <ru@nginx.com>
parents: 1770
diff changeset
722 error_page 404 =301 http://example.com/notfound.html;
da6a3e401b26 Slightly reformatted the error_page description.
Ruslan Ermilov <ru@nginx.com>
parents: 1770
diff changeset
723 </example>
da6a3e401b26 Slightly reformatted the error_page description.
Ruslan Ermilov <ru@nginx.com>
parents: 1770
diff changeset
724 In this case, by default, the response code 302 is returned to the client.
da6a3e401b26 Slightly reformatted the error_page description.
Ruslan Ermilov <ru@nginx.com>
parents: 1770
diff changeset
725 It can only be changed to one of the redirect status
1964
2a3c58dcb3e8 Documented support for the 308 Permanent Redirect.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1953
diff changeset
726 codes (301, 302, 303, 307, and 308).
2039
d2969b2f69ae Added history notes about codes 201, 307, and 308.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2036
diff changeset
727 <note>
d2969b2f69ae Added history notes about codes 201, 307, and 308.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2036
diff changeset
728 The code 307 was not treated as a redirect until versions 1.1.16 and 1.0.13.
d2969b2f69ae Added history notes about codes 201, 307, and 308.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2036
diff changeset
729 </note>
d2969b2f69ae Added history notes about codes 201, 307, and 308.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2036
diff changeset
730
d2969b2f69ae Added history notes about codes 201, 307, and 308.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2036
diff changeset
731 <note>
d2969b2f69ae Added history notes about codes 201, 307, and 308.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2036
diff changeset
732 The code 308 was not treated as a redirect until version 1.13.0.
d2969b2f69ae Added history notes about codes 201, 307, and 308.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2036
diff changeset
733 </note>
1826
da6a3e401b26 Slightly reformatted the error_page description.
Ruslan Ermilov <ru@nginx.com>
parents: 1770
diff changeset
734 </para>
da6a3e401b26 Slightly reformatted the error_page description.
Ruslan Ermilov <ru@nginx.com>
parents: 1770
diff changeset
735
da6a3e401b26 Slightly reformatted the error_page description.
Ruslan Ermilov <ru@nginx.com>
parents: 1770
diff changeset
736 <para>
2593
eeed494bba51 Unified phrases about configuration levels and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents: 2567
diff changeset
737 These directives are inherited from the previous configuration level
eeed494bba51 Unified phrases about configuration levels and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents: 2567
diff changeset
738 if and only if there are no <literal>error_page</literal> directives
eeed494bba51 Unified phrases about configuration levels and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents: 2567
diff changeset
739 defined on the current level.
1826
da6a3e401b26 Slightly reformatted the error_page description.
Ruslan Ermilov <ru@nginx.com>
parents: 1770
diff changeset
740 </para>
da6a3e401b26 Slightly reformatted the error_page description.
Ruslan Ermilov <ru@nginx.com>
parents: 1770
diff changeset
741
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
742 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
743
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
744
576
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
745 <directive name="etag">
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
746 <syntax><literal>on</literal> | <literal>off</literal></syntax>
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
747 <default>on</default>
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
748 <context>http</context>
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
749 <context>server</context>
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
750 <context>location</context>
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
751 <appeared-in>1.3.3</appeared-in>
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
752
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
753 <para>
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
754 Enables or disables automatic generation of the <header>ETag</header>
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
755 response header field for static resources.
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
756 </para>
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
757
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
758 </directive>
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
759
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
760
651
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
761 <directive name="http">
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
762 <syntax block="yes"/>
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
763 <default/>
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
764 <context>main</context>
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
765
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
766 <para>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 958
diff changeset
767 Provides the configuration file context in which the HTTP server directives
651
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
768 are specified.
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
769 </para>
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
770
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
771 </directive>
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
772
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
773
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
774 <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
775 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
776 <literal>off</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
777 <literal>exact</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
778 <literal>before</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
779 <default>exact</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>
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
783 <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
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 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
787 with the time in the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
788 <header>If-Modified-Since</header>
235
6d8356490215 Consistently call header fields as such.
Ruslan Ermilov <ru@nginx.com>
parents: 234
diff changeset
789 request header field:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
790
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
791 <list type="tag">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
792
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
793 <tag-name><literal>off</literal></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
794 <tag-desc>
2921
52ea1f45b324 Clarified "if_modified_since off" behaviour (ticket #2176).
Maxim Dounin <mdounin@mdounin.ru>
parents: 2912
diff changeset
795 the response is always considered modified (0.7.34);
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
796 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
797
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
798 <tag-name><literal>exact</literal></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
799 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
800 exact match;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
801 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
802
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
803 <tag-name><literal>before</literal></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
804 <tag-desc>
2922
547303412ab9 Fixed article in "if_modified_since before".
Maxim Dounin <mdounin@mdounin.ru>
parents: 2921
diff changeset
805 modification time of the response is
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
806 less than or equal to the time in the <header>If-Modified-Since</header>
235
6d8356490215 Consistently call header fields as such.
Ruslan Ermilov <ru@nginx.com>
parents: 234
diff changeset
807 request header field.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
808 </tag-desc>
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 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
811 </para>
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 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
814
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
815
152
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
816 <directive name="ignore_invalid_headers">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
817 <syntax><literal>on</literal> | <literal>off</literal></syntax>
152
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
818 <default>on</default>
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
819 <context>http</context>
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
820 <context>server</context>
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
821
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
822 <para>
235
6d8356490215 Consistently call header fields as such.
Ruslan Ermilov <ru@nginx.com>
parents: 234
diff changeset
823 Controls whether header fields with invalid names should be ignored.
252
6f710464be38 Applied nitpicking by Maxim Dounin, translated into English.
Ruslan Ermilov <ru@nginx.com>
parents: 246
diff changeset
824 Valid names are composed of English letters, digits, hyphens, and possibly
152
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
825 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
826 directive).
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
827 </para>
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
828
426
1d6dc85ed324 Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents: 419
diff changeset
829 <para>
1023
375055da60fa Improved wording of merge_slashes etc. (ticket #448).
Maxim Dounin <mdounin@mdounin.ru>
parents: 1022
diff changeset
830 If the directive is specified on the <link id="server"/> level,
2795
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
831 the value from the default server can be used.
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
832 Details are provided in the
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
833 “<link doc="server_names.xml" id="virtual_server_selection">Virtual
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
834 server selection</link>” section.
426
1d6dc85ed324 Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents: 419
diff changeset
835 </para>
1d6dc85ed324 Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents: 419
diff changeset
836
152
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
837 </directive>
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
838
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
839
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
840 <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
841 <syntax/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
842 <default/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
843 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
844
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
845 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
846 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
847 For external requests, the client error
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
848 <http-status code="404" text="Not Found"/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
849 is returned.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
850 Internal requests are the following:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
851
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
852 <list type="bullet">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
853
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
854 <listitem>
429
2b9507b2cdf3 List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents: 426
diff changeset
855 requests redirected by the
2b9507b2cdf3 List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents: 426
diff changeset
856 <link id="error_page"/>,
2b9507b2cdf3 List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents: 426
diff changeset
857 <link doc="ngx_http_index_module.xml" id="index"/>,
2956
a85e4d126bc7 Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2922
diff changeset
858 <link doc="ngx_http_internal_redirect_module.xml" id="internal_redirect"/>,
429
2b9507b2cdf3 List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents: 426
diff changeset
859 <link doc="ngx_http_random_index_module.xml" id="random_index"/>, and
2b9507b2cdf3 List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents: 426
diff changeset
860 <link id="try_files"/> directives;
2b9507b2cdf3 List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents: 426
diff changeset
861 </listitem>
2b9507b2cdf3 List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents: 426
diff changeset
862
2b9507b2cdf3 List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents: 426
diff changeset
863 <listitem>
2b9507b2cdf3 List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents: 426
diff changeset
864 requests redirected by the <header>X-Accel-Redirect</header>
2b9507b2cdf3 List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents: 426
diff changeset
865 response header field from an upstream server;
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
866 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
867
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
868 <listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
869 subrequests formed by the
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
870 “<command>include virtual</command>”
438
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
871 command of the
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
872 <link doc="ngx_http_ssi_module.xml">ngx_http_ssi_module</link>
2036
ee0aeddbe8a2 Updated types of subrequests allowed in the internal location.
Sergey Kandaurov <pluknet@nginx.com>
parents: 2003
diff changeset
873 module, by the
438
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
874 <link doc="ngx_http_addition_module.xml">ngx_http_addition_module</link>
2036
ee0aeddbe8a2 Updated types of subrequests allowed in the internal location.
Sergey Kandaurov <pluknet@nginx.com>
parents: 2003
diff changeset
875 module directives, and by
ee0aeddbe8a2 Updated types of subrequests allowed in the internal location.
Sergey Kandaurov <pluknet@nginx.com>
parents: 2003
diff changeset
876 <link doc="ngx_http_auth_request_module.xml" id="auth_request"/> and
ee0aeddbe8a2 Updated types of subrequests allowed in the internal location.
Sergey Kandaurov <pluknet@nginx.com>
parents: 2003
diff changeset
877 <link doc="ngx_http_mirror_module.xml" id="mirror"/> directives;
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
878 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
879
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
880 <listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
881 requests changed by the
429
2b9507b2cdf3 List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents: 426
diff changeset
882 <link doc="ngx_http_rewrite_module.xml" id="rewrite"/> directive.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
883 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
884
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
885 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
886 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
887
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
888 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
889 Example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
890 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
891 error_page 404 /404.html;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
892
2206
5cacd6fffade Eliminated some examples of unsafe prefix locations.
Ruslan Ermilov <ru@nginx.com>
parents: 2199
diff changeset
893 location = /404.html {
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
894 internal;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
895 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
896 </example>
674
c48c0936b4df Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
897 <note>
c48c0936b4df Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
898 There is a limit of 10 internal redirects per request to prevent
c48c0936b4df Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
899 request processing cycles that can occur in incorrect configurations.
c48c0936b4df Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
900 If this limit is reached, the error
c48c0936b4df Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
901 <http-status code="500" text="Internal Server Error"/> is returned.
c48c0936b4df Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
902 In such cases, the “rewrite or internal redirection cycle” message
c48c0936b4df Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
903 can be seen in the error log.
c48c0936b4df Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
904 </note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
905 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
906
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
907 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
908
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
909
176
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
910 <directive name="keepalive_disable">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
911 <syntax><literal>none</literal> | <value>browser</value> ...</syntax>
467
c505c92c8658 Documented recent changes to the "keepalive_disable" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 454
diff changeset
912 <default>msie6</default>
176
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
913 <context>http</context>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
914 <context>server</context>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
915 <context>location</context>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
916
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
917 <para>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
918 Disables keep-alive connections with misbehaving browsers.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
919 The <value>browser</value> parameters specify which
176
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
920 browsers will be affected.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
921 The value <literal>msie6</literal> disables keep-alive connections
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
922 with old versions of MSIE, once a POST request is received.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
923 The value <literal>safari</literal> disables keep-alive connections
1911
f024ac0ec5c7 Apple rebranded Mac OS X to macOS.
Sergey Kandaurov <pluknet@nginx.com>
parents: 1904
diff changeset
924 with Safari and Safari-like browsers on macOS and macOS-like
467
c505c92c8658 Documented recent changes to the "keepalive_disable" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 454
diff changeset
925 operating systems.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
926 The value <literal>none</literal> enables keep-alive connections
176
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
927 with all browsers.
467
c505c92c8658 Documented recent changes to the "keepalive_disable" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 454
diff changeset
928 <note>
c505c92c8658 Documented recent changes to the "keepalive_disable" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 454
diff changeset
929 Prior to version 1.1.18, the value <literal>safari</literal> matched
c505c92c8658 Documented recent changes to the "keepalive_disable" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 454
diff changeset
930 all Safari and Safari-like browsers on all operating systems, and
c505c92c8658 Documented recent changes to the "keepalive_disable" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 454
diff changeset
931 keep-alive connections with them were disabled by default.
c505c92c8658 Documented recent changes to the "keepalive_disable" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 454
diff changeset
932 </note>
176
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
933 </para>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
934
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
935 </directive>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
936
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
937
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
938 <directive name="keepalive_requests">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
939 <syntax><value>number</value></syntax>
2706
4f44386a16b1 Changed default value of keepalive_requests.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2705
diff changeset
940 <default>1000</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
941 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
942 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
943 <context>location</context>
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
944 <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
945
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
946 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
947 Sets the maximum number of requests that can be
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
948 served through one keep-alive connection.
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
949 After the maximum number of 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
950 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
951
2450
a26a42699207 Added note about max number of keepalive requests.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
952 <para>
a26a42699207 Added note about max number of keepalive requests.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
953 Closing connections periodically is necessary to free
a26a42699207 Added note about max number of keepalive requests.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
954 per-connection memory allocations.
a26a42699207 Added note about max number of keepalive requests.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
955 Therefore, using too high maximum number of requests
a26a42699207 Added note about max number of keepalive requests.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
956 could result in excessive memory usage and not recommended.
a26a42699207 Added note about max number of keepalive requests.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
957 </para>
a26a42699207 Added note about max number of keepalive requests.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
958
2706
4f44386a16b1 Changed default value of keepalive_requests.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2705
diff changeset
959 <para>
4f44386a16b1 Changed default value of keepalive_requests.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2705
diff changeset
960 <note>
4f44386a16b1 Changed default value of keepalive_requests.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2705
diff changeset
961 Prior to version 1.19.10, the default value was 100.
4f44386a16b1 Changed default value of keepalive_requests.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2705
diff changeset
962 </note>
4f44386a16b1 Changed default value of keepalive_requests.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2705
diff changeset
963 </para>
4f44386a16b1 Changed default value of keepalive_requests.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2705
diff changeset
964
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
965 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
966
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
967
2705
06805824d0f0 Documented the keepalive_time directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2657
diff changeset
968 <directive name="keepalive_time">
06805824d0f0 Documented the keepalive_time directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2657
diff changeset
969 <syntax><value>time</value></syntax>
06805824d0f0 Documented the keepalive_time directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2657
diff changeset
970 <default>1h</default>
06805824d0f0 Documented the keepalive_time directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2657
diff changeset
971 <context>http</context>
06805824d0f0 Documented the keepalive_time directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2657
diff changeset
972 <context>server</context>
06805824d0f0 Documented the keepalive_time directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2657
diff changeset
973 <context>location</context>
06805824d0f0 Documented the keepalive_time directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2657
diff changeset
974 <appeared-in>1.19.10</appeared-in>
06805824d0f0 Documented the keepalive_time directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2657
diff changeset
975
06805824d0f0 Documented the keepalive_time directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2657
diff changeset
976 <para>
06805824d0f0 Documented the keepalive_time directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2657
diff changeset
977 Limits the maximum time during which
06805824d0f0 Documented the keepalive_time directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2657
diff changeset
978 requests can be processed through one keep-alive connection.
06805824d0f0 Documented the keepalive_time directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2657
diff changeset
979 After this time is reached, the connection is closed
06805824d0f0 Documented the keepalive_time directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2657
diff changeset
980 following the subsequent request processing.
06805824d0f0 Documented the keepalive_time directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2657
diff changeset
981 </para>
06805824d0f0 Documented the keepalive_time directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2657
diff changeset
982
06805824d0f0 Documented the keepalive_time directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2657
diff changeset
983 </directive>
06805824d0f0 Documented the keepalive_time directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2657
diff changeset
984
06805824d0f0 Documented the keepalive_time directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2657
diff changeset
985
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
986 <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
987 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
988 <value>timeout</value>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
989 [<value>header_timeout</value>]</syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
990 <default>75s</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
991 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
992 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
993 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
994
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
995 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
996 The first parameter sets a timeout during which a keep-alive
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
997 client connection will stay open on the server side.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
998 The zero value disables keep-alive client connections.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
999 The optional second parameter sets a value in the
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1000 <header>Keep-Alive: timeout=<value>time</value></header>
235
6d8356490215 Consistently call header fields as such.
Ruslan Ermilov <ru@nginx.com>
parents: 234
diff changeset
1001 response header field.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1002 Two parameters may differ.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1003 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1004
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 The
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1007 <header>Keep-Alive: timeout=<value>time</value></header>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1008 header field is recognized by Mozilla and Konqueror.
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1009 MSIE closes keep-alive connections by itself in about 60 seconds.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1010 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1011
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1012 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1013
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1014
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1015 <directive name="large_client_header_buffers">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1016 <syntax><value>number</value> <value>size</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1017 <default>4 8k</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1018 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1019 <context>server</context>
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 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1022 Sets the maximum <value>number</value> and <value>size</value> of
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1023 buffers used for reading large client request header.
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1024 A request line cannot exceed the size of one buffer, or the
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1025 <http-status code="414" text="Request-URI Too Large"/>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1026 error is returned to the client.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1027 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
1028 <http-status code="400" text="Bad Request"/>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1029 error is returned to the client.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1030 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
1031 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
1032 If after the end of request processing a connection is transitioned
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1033 into the keep-alive state, these buffers are released.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1034 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1035
2795
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
1036 <para>
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
1037 If the directive is specified on the <link id="server"/> level,
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
1038 the value from the default server can be used.
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
1039 Details are provided in the
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
1040 “<link doc="server_names.xml" id="virtual_server_selection">Virtual
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
1041 server selection</link>” section.
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
1042 </para>
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
1043
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1044 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1045
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 <directive name="limit_except">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1048 <syntax block="yes"><value>method</value> ...</syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1049 <default/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1050 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1051
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1052 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1053 Limits allowed HTTP methods inside a location.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1054 The <value>method</value> parameter can be one of the following:
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1055 <literal>GET</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1056 <literal>HEAD</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1057 <literal>POST</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1058 <literal>PUT</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1059 <literal>DELETE</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1060 <literal>MKCOL</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1061 <literal>COPY</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1062 <literal>MOVE</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1063 <literal>OPTIONS</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1064 <literal>PROPFIND</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1065 <literal>PROPPATCH</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1066 <literal>LOCK</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1067 <literal>UNLOCK</literal>,
65
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
1068 or
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1069 <literal>PATCH</literal>.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1070 Allowing the <literal>GET</literal> method makes the
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1071 <literal>HEAD</literal> method also allowed.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1072 Access to other methods can be limited using the
2139
f6e578b1b02d Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2134
diff changeset
1073 <link doc="ngx_http_access_module.xml">ngx_http_access_module</link>,
f6e578b1b02d Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2134
diff changeset
1074 <link doc="ngx_http_auth_basic_module.xml">ngx_http_auth_basic_module</link>,
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1075 and
2139
f6e578b1b02d Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2134
diff changeset
1076 <link doc="ngx_http_auth_jwt_module.xml">ngx_http_auth_jwt_module</link>
f6e578b1b02d Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2134
diff changeset
1077 (1.13.10)
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1078 modules directives:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1079 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1080 limit_except GET {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1081 allow 192.168.1.0/32;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1082 deny all;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1083 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1084 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1085 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
1086 <emphasis>except</emphasis> GET and HEAD.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1087 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1088
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1089 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1090
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1091
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1092 <directive name="limit_rate">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1093 <syntax><value>rate</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1094 <default>0</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1095 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1096 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1097 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1098 <context>if in location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1099
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1100 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1101 Limits the rate of response transmission to a client.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1102 The <value>rate</value> is specified in bytes per second.
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 958
diff changeset
1103 The zero value disables rate limiting.
57
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 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
1106 -->
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1107 The limit is set per a request, and so if a client simultaneously opens
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1108 two connections, the overall rate will be twice as much
767
1bb8b733416a Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents: 747
diff changeset
1109 as the specified limit.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1110 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1111
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1112 <para>
2391
375a3dfde23b Unified phrase "Parameter value can contain variables".
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2390
diff changeset
1113 Parameter value can contain variables (1.17.0).
767
1bb8b733416a Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents: 747
diff changeset
1114 It may be useful in cases where rate should be limited
1bb8b733416a Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents: 747
diff changeset
1115 depending on a certain condition:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1116 <example>
2384
144c8e3d6c09 Documented variables support in limit_rate and limit_rate_after.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2220
diff changeset
1117 map $slow $rate {
144c8e3d6c09 Documented variables support in limit_rate and limit_rate_after.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2220
diff changeset
1118 1 4k;
144c8e3d6c09 Documented variables support in limit_rate and limit_rate_after.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2220
diff changeset
1119 2 8k;
144c8e3d6c09 Documented variables support in limit_rate and limit_rate_after.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2220
diff changeset
1120 }
144c8e3d6c09 Documented variables support in limit_rate and limit_rate_after.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2220
diff changeset
1121
144c8e3d6c09 Documented variables support in limit_rate and limit_rate_after.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2220
diff changeset
1122 limit_rate $rate;
144c8e3d6c09 Documented variables support in limit_rate and limit_rate_after.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2220
diff changeset
1123 </example>
144c8e3d6c09 Documented variables support in limit_rate and limit_rate_after.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2220
diff changeset
1124 </para>
144c8e3d6c09 Documented variables support in limit_rate and limit_rate_after.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2220
diff changeset
1125
144c8e3d6c09 Documented variables support in limit_rate and limit_rate_after.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2220
diff changeset
1126 <para>
144c8e3d6c09 Documented variables support in limit_rate and limit_rate_after.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2220
diff changeset
1127 Rate limit can also be set in the
144c8e3d6c09 Documented variables support in limit_rate and limit_rate_after.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2220
diff changeset
1128 <link id="var_limit_rate"><var>$limit_rate</var></link> variable,
144c8e3d6c09 Documented variables support in limit_rate and limit_rate_after.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2220
diff changeset
1129 however, since version 1.17.0, this method is not recommended:
144c8e3d6c09 Documented variables support in limit_rate and limit_rate_after.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2220
diff changeset
1130 <example>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1131 server {
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 if ($slow) {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1134 set $limit_rate 4k;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1135 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1136
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1137 ...
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1138 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1139 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1140 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1141
506
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 503
diff changeset
1142 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1143 Rate limit can also be set in the
767
1bb8b733416a Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents: 747
diff changeset
1144 <header>X-Accel-Limit-Rate</header> header field of a proxied server response.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1145 This capability can be disabled using the
1181
b8f0362f61e5 Added links to scgi.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1151
diff changeset
1146 <link doc="ngx_http_proxy_module.xml" id="proxy_ignore_headers"/>,
b8f0362f61e5 Added links to scgi.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1151
diff changeset
1147 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_ignore_headers"/>,
1194
9264fdb6c833 Added links to uwsgi.
Ruslan Ermilov <ru@nginx.com>
parents: 1181
diff changeset
1148 <link doc="ngx_http_uwsgi_module.xml" id="uwsgi_ignore_headers"/>,
506
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 503
diff changeset
1149 and
1181
b8f0362f61e5 Added links to scgi.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1151
diff changeset
1150 <link doc="ngx_http_scgi_module.xml" id="scgi_ignore_headers"/>
506
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 503
diff changeset
1151 directives.
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 503
diff changeset
1152 </para>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 503
diff changeset
1153
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1154 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1155
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1156
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
1157 <directive name="limit_rate_after">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1158 <syntax><value>size</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1159 <default>0</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1160 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1161 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1162 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1163 <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
1164 <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
1165
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1166 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1167 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
1168 of a response to a client will be rate limited.
2391
375a3dfde23b Unified phrase "Parameter value can contain variables".
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2390
diff changeset
1169 Parameter value can contain variables (1.17.0).
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1170 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1171
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 Example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1174 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1175 location /flv/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1176 flv;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1177 limit_rate_after 500k;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1178 limit_rate 50k;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1179 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1180 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1181 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1182
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1183 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1184
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1185
172
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1186 <directive name="lingering_close">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1187 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1188 <literal>off</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1189 <literal>on</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1190 <literal>always</literal></syntax>
172
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1191 <default>on</default>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1192 <context>http</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1193 <context>server</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1194 <context>location</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1195 <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
1196 <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
1197
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1198 <para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1199 Controls how nginx closes client connections.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1200 </para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1201
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1202 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1203 The default value “<literal>on</literal>” instructs nginx to
172
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1204 <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
1205 <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
1206 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
1207 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
1208 </para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1209
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1210 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1211 The value “<literal>always</literal>” will cause nginx to unconditionally
172
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1212 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
1213 </para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1214
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1215 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1216 The value “<literal>off</literal>” tells nginx to never wait for
172
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1217 more data and close the connection immediately.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1218 This behavior breaks the protocol and should not be used under normal
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1219 circumstances.
172
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1220 </para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1221
2567
4f3494d80949 Documented support for HTTP/2 in lingering_close.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2523
diff changeset
1222 <para>
4f3494d80949 Documented support for HTTP/2 in lingering_close.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2523
diff changeset
1223 To control closing
4f3494d80949 Documented support for HTTP/2 in lingering_close.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2523
diff changeset
1224 <link doc="ngx_http_v2_module.xml">HTTP/2</link> connections,
4f3494d80949 Documented support for HTTP/2 in lingering_close.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2523
diff changeset
1225 the directive must be specified on the <link id="server"/> level (1.19.1).
4f3494d80949 Documented support for HTTP/2 in lingering_close.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2523
diff changeset
1226 </para>
4f3494d80949 Documented support for HTTP/2 in lingering_close.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2523
diff changeset
1227
172
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1228 </directive>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1229
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1230
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1231 <directive name="lingering_time">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1232 <syntax><value>time</value></syntax>
172
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1233 <default>30s</default>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1234 <context>http</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1235 <context>server</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1236 <context>location</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1237
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1238 <para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1239 When <link id="lingering_close"/> is in effect,
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1240 this directive specifies the maximum time during which nginx
172
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1241 will process (read and ignore) additional data coming from a client.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1242 After that, the connection will be closed, even if there will be
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1243 more data.
172
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1244 </para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1245
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1246 </directive>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1247
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1248
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1249 <directive name="lingering_timeout">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1250 <syntax><value>time</value></syntax>
172
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1251 <default>5s</default>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1252 <context>http</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1253 <context>server</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1254 <context>location</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1255
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1256 <para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1257 When <link id="lingering_close"/> is in effect, this directive specifies
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1258 the maximum waiting time for more client data to arrive.
172
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1259 If data are not received during this time, the connection is closed.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1260 Otherwise, the data are read and ignored, and nginx starts waiting
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1261 for more data again.
172
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1262 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
1263 <link id="lingering_time"/> directive.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1264 </para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1265
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1266 </directive>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1267
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1268
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1269 <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
1270 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1271 <value>address</value>[:<value>port</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1272 [<literal>default_server</literal>]
869
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1273 [<literal>ssl</literal>]
2956
a85e4d126bc7 Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2922
diff changeset
1274 [<literal>http2</literal> |
a85e4d126bc7 Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2922
diff changeset
1275 <literal>quic</literal> |
a85e4d126bc7 Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2922
diff changeset
1276 <literal>spdy</literal>]
1097
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1037
diff changeset
1277 [<literal>proxy_protocol</literal>]
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1278 [<literal>setfib</literal>=<value>number</value>]
1036
5894aa46ffef Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents: 1035
diff changeset
1279 [<literal>fastopen</literal>=<value>number</value>]
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1280 [<literal>backlog</literal>=<value>number</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1281 [<literal>rcvbuf</literal>=<value>size</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1282 [<literal>sndbuf</literal>=<value>size</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1283 [<literal>accept_filter</literal>=<value>filter</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1284 [<literal>deferred</literal>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1285 [<literal>bind</literal>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1286 [<literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>]
1493
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1471
diff changeset
1287 [<literal>reuseport</literal>]
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1288 [<literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>]]</syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1289 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1290 <value>port</value>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1291 [<literal>default_server</literal>]
869
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1292 [<literal>ssl</literal>]
2956
a85e4d126bc7 Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2922
diff changeset
1293 [<literal>http2</literal> |
a85e4d126bc7 Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2922
diff changeset
1294 <literal>quic</literal> |
a85e4d126bc7 Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2922
diff changeset
1295 <literal>spdy</literal>]
1097
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1037
diff changeset
1296 [<literal>proxy_protocol</literal>]
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1297 [<literal>setfib</literal>=<value>number</value>]
1036
5894aa46ffef Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents: 1035
diff changeset
1298 [<literal>fastopen</literal>=<value>number</value>]
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1299 [<literal>backlog</literal>=<value>number</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1300 [<literal>rcvbuf</literal>=<value>size</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1301 [<literal>sndbuf</literal>=<value>size</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1302 [<literal>accept_filter</literal>=<value>filter</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1303 [<literal>deferred</literal>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1304 [<literal>bind</literal>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1305 [<literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>]
1493
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1471
diff changeset
1306 [<literal>reuseport</literal>]
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1307 [<literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>]]</syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1308 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1309 <literal>unix:</literal><value>path</value>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1310 [<literal>default_server</literal>]
869
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1311 [<literal>ssl</literal>]
2956
a85e4d126bc7 Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2922
diff changeset
1312 [<literal>http2</literal> |
a85e4d126bc7 Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2922
diff changeset
1313 <literal>quic</literal> |
a85e4d126bc7 Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2922
diff changeset
1314 <literal>spdy</literal>]
1097
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1037
diff changeset
1315 [<literal>proxy_protocol</literal>]
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1316 [<literal>backlog</literal>=<value>number</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1317 [<literal>rcvbuf</literal>=<value>size</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1318 [<literal>sndbuf</literal>=<value>size</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1319 [<literal>accept_filter</literal>=<value>filter</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1320 [<literal>deferred</literal>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1321 [<literal>bind</literal>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1322 [<literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>]]</syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1323 <default>*:80 | *:8000</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1324 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1325
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1326 <para>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 958
diff changeset
1327 Sets the <value>address</value> and <value>port</value> for IP,
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 958
diff changeset
1328 or the <value>path</value> 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
1329 the server will accept requests.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1330 Both <value>address</value> and <value>port</value>,
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1331 or only <value>address</value> or only <value>port</value> can be specified.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1332 An <value>address</value> may also be a hostname, for example:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1333 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1334 listen 127.0.0.1:8000;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1335 listen 127.0.0.1;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1336 listen 8000;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1337 listen *:8000;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1338 listen localhost:8000;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1339 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1340 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
1341 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1342 listen [::]:8000;
941
7d1d53d4d293 Removed link-scoped IPv6 addresses from examples.
Ruslan Ermilov <ru@nginx.com>
parents: 940
diff changeset
1343 listen [::1];
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1344 </example>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1345 UNIX-domain sockets (0.8.21) are specified with the “<literal>unix:</literal>”
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1346 prefix:
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1347 <example>
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1348 listen unix:/var/run/nginx.sock;
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1349 </example>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1350 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1351
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1352 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1353 If only <value>address</value> is given, the port 80 is used.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1354 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1355
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1356 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1357 If the directive is not present then either <literal>*:80</literal> is used
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1358 if nginx runs with the superuser privileges, or <literal>*:8000</literal>
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1359 otherwise.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1360 </para>
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 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1363 The <literal>default_server</literal> parameter, if present,
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1364 will cause the server to become the default server for the specified
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1365 <value>address</value>:<value>port</value> pair.
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1366 If none of the directives have the <literal>default_server</literal>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1367 parameter then the first server with the
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1368 <value>address</value>:<value>port</value> pair will be
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1369 the default server for this pair.
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1370 <note>
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1371 In versions prior to 0.8.21 this parameter is named simply
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1372 <literal>default</literal>.
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1373 </note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1374 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1375
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1376 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1377 The <literal>ssl</literal> parameter (0.7.14) allows specifying that all
869
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1378 connections accepted on this port should work in SSL mode.
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1379 This allows for a more compact <link doc="configuring_https_servers.xml"
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1380 id="single_http_https_server">configuration</link> for the server that
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1381 handles both HTTP and HTTPS requests.
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1382 </para>
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1383
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1384 <para>
1567
695999bdd4a5 Updated description of http2 parameter, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1561
diff changeset
1385 The <literal>http2</literal> parameter (1.9.5) configures the port to accept
695999bdd4a5 Updated description of http2 parameter, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1561
diff changeset
1386 <link doc="ngx_http_v2_module.xml">HTTP/2</link> connections.
695999bdd4a5 Updated description of http2 parameter, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1561
diff changeset
1387 Normally, for this to work the <literal>ssl</literal> parameter should be
695999bdd4a5 Updated description of http2 parameter, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1561
diff changeset
1388 specified as well, but nginx can also be configured to accept HTTP/2
695999bdd4a5 Updated description of http2 parameter, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1561
diff changeset
1389 connections without SSL.
695999bdd4a5 Updated description of http2 parameter, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1561
diff changeset
1390 </para>
695999bdd4a5 Updated description of http2 parameter, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1561
diff changeset
1391
2956
a85e4d126bc7 Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2922
diff changeset
1392 <para id="quic">
a85e4d126bc7 Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2922
diff changeset
1393 The <literal>quic</literal> parameter (1.23.4) configures the port to accept
a85e4d126bc7 Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2922
diff changeset
1394 <link doc="ngx_http_v3_module.xml">QUIC</link> connections.
a85e4d126bc7 Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2922
diff changeset
1395 </para>
a85e4d126bc7 Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2922
diff changeset
1396
1567
695999bdd4a5 Updated description of http2 parameter, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1561
diff changeset
1397 <para>
695999bdd4a5 Updated description of http2 parameter, translated into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1561
diff changeset
1398 The <literal>spdy</literal> parameter (1.3.15-1.9.4) allows accepting
869
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1399 <link doc="ngx_http_spdy_module.xml">SPDY</link> connections on this port.
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1400 Normally, for this to work the <literal>ssl</literal> parameter should be
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1401 specified as well, but nginx can also be configured to accept SPDY
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1402 connections without SSL.
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1403 </para>
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1404
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1405 <para>
1097
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1037
diff changeset
1406 The <literal>proxy_protocol</literal> parameter (1.5.12)
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1037
diff changeset
1407 allows specifying that all connections accepted on this port should use the
2912
7ebe15d6c68d Updated link to the PROXY protocol specification.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2903
diff changeset
1408 <link url="http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt">PROXY
1097
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1037
diff changeset
1409 protocol</link>.
2125
b19d5d47c16c Documented ver.2 of the PROXY protocol.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2121
diff changeset
1410 <note>
b19d5d47c16c Documented ver.2 of the PROXY protocol.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2121
diff changeset
1411 The PROXY protocol version 2 is supported since version 1.13.11.
b19d5d47c16c Documented ver.2 of the PROXY protocol.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2121
diff changeset
1412 </note>
1097
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1037
diff changeset
1413 </para>
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1037
diff changeset
1414
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1037
diff changeset
1415 <para>
1414
5addfab7e171 Corrected article.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1279
diff changeset
1416 The <literal>listen</literal> directive
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1417 can have several additional parameters specific to socket-related system calls.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1418 These parameters can be specified in any
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1419 <literal>listen</literal> directive, but only once for a given
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1420 <value>address</value>:<value>port</value> pair.
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1421 <note>
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1422 In versions prior to 0.8.21, they could only be
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1423 specified in the <literal>listen</literal> directive together with the
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1424 <literal>default</literal> parameter.
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1425 </note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1426 <list type="tag">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1427
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1428 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1429 <literal>setfib</literal>=<value>number</value>
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1430 </tag-name>
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1431 <tag-desc>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1432 this parameter (0.8.44) sets the associated routing table, FIB
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1433 (the <c-def>SO_SETFIB</c-def> option) for the listening socket.
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1434 This currently works only on FreeBSD.
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1435 </tag-desc>
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1436
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1437 <tag-name>
1036
5894aa46ffef Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents: 1035
diff changeset
1438 <literal>fastopen</literal>=<value>number</value>
5894aa46ffef Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents: 1035
diff changeset
1439 </tag-name>
5894aa46ffef Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents: 1035
diff changeset
1440 <tag-desc>
5894aa46ffef Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents: 1035
diff changeset
1441 enables
5894aa46ffef Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents: 1035
diff changeset
1442 “<link url="http://en.wikipedia.org/wiki/TCP_Fast_Open">TCP Fast Open</link>”
1037
3fde5aa256ac Fixed markup.
Vladimir Homutov <vl@nginx.com>
parents: 1036
diff changeset
1443 for the listening socket (1.5.8) and
2831
4add6ae1296f Updated links to datatracker.ietf.org.
Sergey Kandaurov <pluknet@nginx.com>
parents: 2795
diff changeset
1444 <link url="https://datatracker.ietf.org/doc/html/rfc7413#section-5.1">limits</link>
1036
5894aa46ffef Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents: 1035
diff changeset
1445 the maximum length for the queue of connections that have not yet completed
5894aa46ffef Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents: 1035
diff changeset
1446 the three-way handshake.
5894aa46ffef Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents: 1035
diff changeset
1447 <note>
5894aa46ffef Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents: 1035
diff changeset
1448 Do not enable this feature unless the server can handle
5894aa46ffef Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents: 1035
diff changeset
1449 receiving the
2831
4add6ae1296f Updated links to datatracker.ietf.org.
Sergey Kandaurov <pluknet@nginx.com>
parents: 2795
diff changeset
1450 <link url="https://datatracker.ietf.org/doc/html/rfc7413#section-6.1">
1036
5894aa46ffef Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents: 1035
diff changeset
1451 same SYN packet with data</link> more than once.
5894aa46ffef Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents: 1035
diff changeset
1452 </note>
5894aa46ffef Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents: 1035
diff changeset
1453 </tag-desc>
5894aa46ffef Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents: 1035
diff changeset
1454
5894aa46ffef Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents: 1035
diff changeset
1455 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1456 <literal>backlog</literal>=<value>number</value>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1457 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1458 <tag-desc>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1459 sets the <literal>backlog</literal> parameter in the
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1460 <c-func>listen</c-func> call that limits
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1461 the maximum length for the queue of pending connections.
1501
40425063b413 Fixed the default "listen backlog" value on DragonFly BSD.
Ruslan Ermilov <ru@nginx.com>
parents: 1500
diff changeset
1462 By default,
1911
f024ac0ec5c7 Apple rebranded Mac OS X to macOS.
Sergey Kandaurov <pluknet@nginx.com>
parents: 1904
diff changeset
1463 <literal>backlog</literal> is set to -1 on FreeBSD, DragonFly BSD, and macOS,
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1464 and to 511 on other platforms.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1465 </tag-desc>
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 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1468 <literal>rcvbuf</literal>=<value>size</value>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1469 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1470 <tag-desc>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1471 sets the receive buffer size
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1472 (the <c-def>SO_RCVBUF</c-def> option) for the listening socket.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1473 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1474
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1475 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1476 <literal>sndbuf</literal>=<value>size</value>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1477 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1478 <tag-desc>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1479 sets the send buffer size
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1480 (the <c-def>SO_SNDBUF</c-def> option) for the listening socket.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1481 </tag-desc>
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 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1484 <literal>accept_filter</literal>=<value>filter</value>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1485 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1486 <tag-desc>
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1487 sets the name of accept filter
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1488 (the <c-def>SO_ACCEPTFILTER</c-def> option) for the listening socket
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1489 that filters incoming connections before passing them to
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1490 <c-func>accept</c-func>.
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1491 This works only on FreeBSD and NetBSD 5.0+.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1492 Possible values are
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1493 <link url="http://man.freebsd.org/accf_data">dataready</link>
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1494 and
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1495 <link url="http://man.freebsd.org/accf_http">httpready</link>.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1496 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1497
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1498 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1499 <literal>deferred</literal>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1500 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1501 <tag-desc>
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1502 instructs to use a deferred <c-func>accept</c-func>
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1503 (the <c-def>TCP_DEFER_ACCEPT</c-def> socket option) on Linux.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1504 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1505
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1506 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1507 <literal>bind</literal>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1508 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1509 <tag-desc>
240
472e88bf177e Slightly better wording for the "bind" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 237
diff changeset
1510 instructs to make a separate <c-func>bind</c-func> call for a given
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1511 <value>address</value>:<value>port</value> pair.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1512 This is useful because if there are several <literal>listen</literal>
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1513 directives with the same port but different addresses, and one of the
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1514 <literal>listen</literal> directives listens on all addresses
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1515 for the given port (<literal>*:</literal><value>port</value>), nginx
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1516 will <c-func>bind</c-func> only to <literal>*:</literal><value>port</value>.
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 958
diff changeset
1517 It should be noted that the <c-func>getsockname</c-func> system call will be
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 958
diff changeset
1518 made in this case to determine the address that accepted the connection.
1035
e9c485d6cc0c Documented that "listen setfib=" implies "bind".
Ruslan Ermilov <ru@nginx.com>
parents: 1031
diff changeset
1519 If the <literal>setfib</literal>,
2724
00afc7c4d4df Documented listen options that imply "bind".
Ruslan Ermilov <ru@nginx.com>
parents: 2707
diff changeset
1520 <literal>fastopen</literal>,
1035
e9c485d6cc0c Documented that "listen setfib=" implies "bind".
Ruslan Ermilov <ru@nginx.com>
parents: 1031
diff changeset
1521 <literal>backlog</literal>, <literal>rcvbuf</literal>,
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1522 <literal>sndbuf</literal>, <literal>accept_filter</literal>,
1279
7261e621dd4a Documented that "listen ipv6only=" implies "bind".
Maxim Dounin <mdounin@mdounin.ru>
parents: 1257
diff changeset
1523 <literal>deferred</literal>, <literal>ipv6only</literal>,
2724
00afc7c4d4df Documented listen options that imply "bind".
Ruslan Ermilov <ru@nginx.com>
parents: 2707
diff changeset
1524 <literal>reuseport</literal>,
1279
7261e621dd4a Documented that "listen ipv6only=" implies "bind".
Maxim Dounin <mdounin@mdounin.ru>
parents: 1257
diff changeset
1525 or <literal>so_keepalive</literal> parameters
223
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1526 are used then for a given
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1527 <value>address</value>:<value>port</value> pair
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1528 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
1529 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1530
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1531 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1532 <literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1533 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1534 <tag-desc>
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1535 this parameter (0.7.42) determines
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1536 (via the <c-def>IPV6_V6ONLY</c-def> socket option)
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1537 whether an IPv6 socket listening on a wildcard address <literal>[::]</literal>
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1538 will accept only IPv6 connections or both IPv6 and IPv4 connections.
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1539 This parameter is turned on by default.
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1540 It can only be set once on start.
615
f3ef5b77d22a Documented that "ipv6only" is now turned on by default for
Ruslan Ermilov <ru@nginx.com>
parents: 589
diff changeset
1541 <note>
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1542 Prior to version 1.3.4,
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1543 if this parameter was omitted then the operating system’s settings were
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1544 in effect for the socket.
615
f3ef5b77d22a Documented that "ipv6only" is now turned on by default for
Ruslan Ermilov <ru@nginx.com>
parents: 589
diff changeset
1545 </note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1546 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1547
1507
14180fa9a518 Added ids for reuseport, mentioned reuseport in news.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1501
diff changeset
1548 <tag-name id="reuseport">
1493
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1471
diff changeset
1549 <literal>reuseport</literal>
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1471
diff changeset
1550 </tag-name>
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1471
diff changeset
1551 <tag-desc>
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1471
diff changeset
1552 this parameter (1.9.1) instructs to create an individual listening socket
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1471
diff changeset
1553 for each worker process
2199
1d60e4b4ed64 Documented SO_REUSEPORT_LB for listen reuseport.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2139
diff changeset
1554 (using the
1d60e4b4ed64 Documented SO_REUSEPORT_LB for listen reuseport.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2139
diff changeset
1555 <c-def>SO_REUSEPORT</c-def> socket option on Linux 3.9+ and DragonFly BSD,
1d60e4b4ed64 Documented SO_REUSEPORT_LB for listen reuseport.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2139
diff changeset
1556 or <c-def>SO_REUSEPORT_LB</c-def> on FreeBSD&nbsp;12+), allowing a kernel
1496
99ce48c8cce3 Corrected the "reuseport" description of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1493
diff changeset
1557 to distribute incoming connections between worker processes.
2199
1d60e4b4ed64 Documented SO_REUSEPORT_LB for listen reuseport.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2139
diff changeset
1558 This currently works only on Linux 3.9+, DragonFly BSD,
1d60e4b4ed64 Documented SO_REUSEPORT_LB for listen reuseport.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2139
diff changeset
1559 and FreeBSD 12+ (1.15.1).
1493
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1471
diff changeset
1560 <note>
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1471
diff changeset
1561 Inappropriate use of this option may have its security
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1471
diff changeset
1562 <link url="http://man7.org/linux/man-pages/man7/socket.7.html">implications</link>.
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1471
diff changeset
1563 </note>
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1471
diff changeset
1564 </tag-desc>
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1471
diff changeset
1565
9faa78768252 Documented the "reuseport" option of the "listen" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1471
diff changeset
1566 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1567 <literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>]
223
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1568 </tag-name>
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1569 <tag-desc>
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1570 this parameter (1.1.11) configures the “TCP keepalive” behavior
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1571 for the listening socket.
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1572 If this parameter is omitted then the operating system’s settings will be
223
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1573 in effect for the socket.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1574 If it is set to the value “<literal>on</literal>”, the
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1575 <c-def>SO_KEEPALIVE</c-def> option is turned on for the socket.
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1576 If it is set to the value “<literal>off</literal>”, the
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1577 <c-def>SO_KEEPALIVE</c-def> option is turned off for the socket.
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1578 Some operating systems support setting of TCP keepalive parameters on
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1579 a per-socket basis using the <c-def>TCP_KEEPIDLE</c-def>,
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1580 <c-def>TCP_KEEPINTVL</c-def>, and <c-def>TCP_KEEPCNT</c-def> socket options.
397
f1c0ae9c1c48 FreeBSD 10.0-CURRENT supports the TCP_KEEPIDLE, TCP_KEEPINTVL, and
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1581 On such systems (currently, Linux 2.4+, NetBSD 5+, and
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1582 FreeBSD 9.0-STABLE), they can be configured
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1583 using the <value>keepidle</value>, <value>keepintvl</value>, and
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1584 <value>keepcnt</value> parameters.
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1585 One or two parameters may be omitted, in which case the system default setting
223
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1586 for the corresponding socket option will be in effect.
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1587 For example,
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1588 <example>so_keepalive=30m::10</example>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1589 will set the idle timeout (<c-def>TCP_KEEPIDLE</c-def>) to 30 minutes,
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1590 leave the probe interval (<c-def>TCP_KEEPINTVL</c-def>) at its system default,
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1591 and set the probes count (<c-def>TCP_KEEPCNT</c-def>) to 10 probes.
223
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1592 </tag-desc>
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1593
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1594 </list>
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 Example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1599 <example>
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1600 listen 127.0.0.1 default_server accept_filter=dataready backlog=1024;
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1601 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1602 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1603
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1604 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1605
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1606
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1607 <directive name="location">
108
72524ae53106 Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents: 106
diff changeset
1608 <syntax block="yes">[
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1609 <literal>=</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1610 <literal>~</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1611 <literal>~*</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1612 <literal>^~</literal>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1613 ] <value>uri</value></syntax>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1614 <syntax block="yes"><literal>@</literal><value>name</value></syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1615 <default/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1616 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1617 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1618
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1619 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1620 Sets configuration depending on a request URI.
503
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1621 </para>
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1622
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1623 <para>
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1624 The matching is performed against a normalized URI,
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1625 after decoding the text encoded in the “<literal>%XX</literal>” form,
503
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1626 resolving references to relative path components “<literal>.</literal>”
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1627 and “<literal>..</literal>”, and possible
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1628 <link id="merge_slashes">compression</link> of two or more
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1629 adjacent slashes into a single slash.
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1630 </para>
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1631
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1632 <para>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1633 A location can either be defined by a prefix string, or by a regular expression.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1634 Regular expressions are specified with the preceding
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1635 “<literal>~*</literal>” modifier (for case-insensitive matching), or the
810
7c72c3e67e77 The "location" directive: improved wording.
Ruslan Ermilov <ru@nginx.com>
parents: 779
diff changeset
1636 “<literal>~</literal>” modifier (for case-sensitive matching).
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1637 To find location matching a given request, nginx first checks
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1638 locations defined using the prefix strings (prefix locations).
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1639 Among them, the location with the longest matching
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1640 prefix is selected and remembered.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1641 Then regular expressions are checked, in the order of their appearance
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1642 in the configuration file.
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1643 The search of regular expressions terminates on the first match,
244
9e2be02df2ce Fixed wording.
Ruslan Ermilov <ru@nginx.com>
parents: 241
diff changeset
1644 and the corresponding configuration is used.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1645 If no match with a regular expression is found then the
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1646 configuration of the prefix location remembered earlier is used.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1647 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1648
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1649 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1650 <literal>location</literal> blocks can be nested, with some exceptions
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1651 mentioned below.
67
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1652 </para>
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1653
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1654 <para>
1911
f024ac0ec5c7 Apple rebranded Mac OS X to macOS.
Sergey Kandaurov <pluknet@nginx.com>
parents: 1904
diff changeset
1655 For case-insensitive operating systems such as macOS and Cygwin,
244
9e2be02df2ce Fixed wording.
Ruslan Ermilov <ru@nginx.com>
parents: 241
diff changeset
1656 matching with prefix strings ignores a case (0.7.7).
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1657 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
1658 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1659
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1660 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1661 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
1662 be used in other directives.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1663 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1664
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1665 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1666 If the longest matching prefix location has the “<literal>^~</literal>” modifier
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1667 then regular expressions are not checked.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1668 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1669
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1670 <para>
810
7c72c3e67e77 The "location" directive: improved wording.
Ruslan Ermilov <ru@nginx.com>
parents: 779
diff changeset
1671 Also, using the “<literal>=</literal>” modifier it is possible to define
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1672 an exact match of URI and location.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1673 If an exact match is found, the search terminates.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1674 For example, if a “<literal>/</literal>” request happens frequently,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1675 defining “<literal>location = /</literal>” will speed up the processing
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1676 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
1677 comparison.
67
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1678 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
1679 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1680
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1681 <para>
67
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1682 <note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1683 In versions from 0.7.1 to 0.8.41, if a request matched the prefix
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1684 location without the “<literal>=</literal>” and “<literal>^~</literal>”
810
7c72c3e67e77 The "location" directive: improved wording.
Ruslan Ermilov <ru@nginx.com>
parents: 779
diff changeset
1685 modifiers, the search also terminated and regular expressions were
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1686 not checked.
67
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1687 </note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1688 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1689
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1690 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1691 Let’s illustrate the above by an example:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1692 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1693 location = / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1694 [ configuration A ]
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 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1698 [ configuration B ]
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1699 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1700
738
0914bbb59fd2 Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents: 711
diff changeset
1701 location /documents/ {
0914bbb59fd2 Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents: 711
diff changeset
1702 [ configuration C ]
0914bbb59fd2 Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents: 711
diff changeset
1703 }
0914bbb59fd2 Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents: 711
diff changeset
1704
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1705 location ^~ /images/ {
738
0914bbb59fd2 Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents: 711
diff changeset
1706 [ configuration D ]
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1707 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1708
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1709 location ~* \.(gif|jpg|jpeg)$ {
738
0914bbb59fd2 Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents: 711
diff changeset
1710 [ configuration E ]
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1711 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1712 </example>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1713 The “<literal>/</literal>” request will match configuration A,
738
0914bbb59fd2 Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents: 711
diff changeset
1714 the “<literal>/index.html</literal>” request will match configuration B,
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1715 the “<literal>/documents/document.html</literal>” request will match
738
0914bbb59fd2 Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents: 711
diff changeset
1716 configuration C,
0914bbb59fd2 Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents: 711
diff changeset
1717 the “<literal>/images/1.gif</literal>” request will match configuration D, and
0914bbb59fd2 Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents: 711
diff changeset
1718 the “<literal>/documents/1.jpg</literal>” request will match configuration E.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1719 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1720
2956
a85e4d126bc7 Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2922
diff changeset
1721 <para id="location_named">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1722 The “<literal>@</literal>” prefix defines a named location.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1723 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
1724 used for request redirection.
67
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1725 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
1726 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1727
914
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1728 <para>
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1729 If a location is defined by a prefix string that ends with the slash character,
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1730 and requests are processed by one of
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1731 <link doc="ngx_http_proxy_module.xml" id="proxy_pass"/>,
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1732 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass"/>,
1194
9264fdb6c833 Added links to uwsgi.
Ruslan Ermilov <ru@nginx.com>
parents: 1181
diff changeset
1733 <link doc="ngx_http_uwsgi_module.xml" id="uwsgi_pass"/>,
2134
4cafd82e5007 Added info about gRPC to various modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2125
diff changeset
1734 <link doc="ngx_http_scgi_module.xml" id="scgi_pass"/>,
4cafd82e5007 Added info about gRPC to various modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2125
diff changeset
1735 <link doc="ngx_http_memcached_module.xml" id="memcached_pass"/>, or
4cafd82e5007 Added info about gRPC to various modules.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2125
diff changeset
1736 <link doc="ngx_http_grpc_module.xml" id="grpc_pass"/>,
1257
ac7a5ee98768 Split long sentence into two.
Ruslan Ermilov <ru@nginx.com>
parents: 1194
diff changeset
1737 then the special processing is performed.
ac7a5ee98768 Split long sentence into two.
Ruslan Ermilov <ru@nginx.com>
parents: 1194
diff changeset
1738 In response to a request with URI equal to this string,
914
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1739 but without the trailing slash,
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1740 a permanent redirect with the code 301 will be returned to the requested URI
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1741 with the slash appended.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1742 If this is not desired, an exact match of the URI and location could be
914
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1743 defined like this:
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1744 <example>
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1745 location /user/ {
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1746 proxy_pass http://user.example.com;
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1747 }
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1748
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1749 location = /user {
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1750 proxy_pass http://login.example.com;
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1751 }
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1752 </example>
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1753 </para>
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1754
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1755 <!--
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1756 <migration from="Apache" directive="Location" />
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1757 -->
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1758
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1759 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1760
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1761
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1762 <directive name="log_not_found">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1763 <syntax><literal>on</literal> | <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1764 <default>on</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1765 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1766 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1767 <context>location</context>
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 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1770 Enables or disables logging of errors about not found files into
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1771 <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
1772 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1773
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1774 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1775
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 <directive name="log_subrequest">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1778 <syntax><literal>on</literal> | <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1779 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1780 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1781 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1782 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1783
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1784 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1785 Enables or disables logging of subrequests into
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1786 <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
1787 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1788
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1789 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1790
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1791
175
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1792 <directive name="max_ranges">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1793 <syntax><value>number</value></syntax>
175
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1794 <default/>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1795 <context>http</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1796 <context>server</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1797 <context>location</context>
499
76a8eca844d0 Documented that "max_ranges" appeared in 1.1.2.
Ruslan Ermilov <ru@nginx.com>
parents: 477
diff changeset
1798 <appeared-in>1.1.2</appeared-in>
175
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1799
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1800 <para>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1801 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
1802 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
1803 byte ranges specified.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1804 By default, the number of ranges is not limited.
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1805 The zero value disables the byte-range support completely.
175
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1806 </para>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1807
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1808 </directive>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1809
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1810
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1811 <directive name="merge_slashes">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1812 <syntax><literal>on</literal> | <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1813 <default>on</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1814 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1815 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1816
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1817 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1818 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
1819 in a URI into a single slash.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1820 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1821
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1822 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1823 Note that compression is essential for the correct matching of prefix string
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1824 and regular expression locations.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1825 Without it, the “<literal>//scripts/one.php</literal>” request would not match
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1826 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1827 location /scripts/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1828 ...
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1829 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1830 </example>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1831 and might be processed as a static file.
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1832 So it gets converted to “<literal>/scripts/one.php</literal>”.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1833 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1834
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1835 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1836 Turning the compression <literal>off</literal> can become necessary if a URI
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1837 contains base64-encoded names, since base64 uses the “<literal>/</literal>”
246
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
1838 character internally.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1839 However, for security considerations, it is better to avoid turning
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1840 the compression off.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1841 </para>
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>
1023
375055da60fa Improved wording of merge_slashes etc. (ticket #448).
Maxim Dounin <mdounin@mdounin.ru>
parents: 1022
diff changeset
1844 If the directive is specified on the <link id="server"/> level,
2795
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
1845 the value from the default server can be used.
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
1846 Details are provided in the
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
1847 “<link doc="server_names.xml" id="virtual_server_selection">Virtual
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
1848 server selection</link>” section.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1849 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1850
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1851 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1852
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1853
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1854 <directive name="msie_padding">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1855 <syntax><literal>on</literal> | <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1856 <default>on</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1857 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1858 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1859 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1860
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1861 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1862 Enables or disables adding comments to responses for MSIE clients with status
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1863 greater than 400 to increase the response size to 512 bytes.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1864 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1865
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1866 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1867
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1868
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1869 <directive name="msie_refresh">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1870 <syntax><literal>on</literal> | <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1871 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1872 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1873 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1874 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1875
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1876 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1877 Enables or disables issuing refreshes instead of redirects for MSIE clients.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1878 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1879
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1880 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1881
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1882
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1883 <directive name="open_file_cache">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1884 <syntax><literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1885 <syntax>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1886 <literal>max</literal>=<value>N</value>
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1887 [<literal>inactive</literal>=<value>time</value>]</syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1888 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1889 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1890 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1891 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1892
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1893 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1894 Configures a cache that can store:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1895 <list type="bullet">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1896
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1897 <listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1898 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
1899 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1900
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1901 <listitem>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1902 information on existence of directories;
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1903 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1904
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1905 <listitem>
68
9de85defbcf8 - "optimize_server_names" is deprecated in favour of "server_name_in_redirects"
Ruslan Ermilov <ru@nginx.com>
parents: 67
diff changeset
1906 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
1907 and so on.
246
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
1908 <note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1909 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
1910 <link id="open_file_cache_errors"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1911 directive.
246
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
1912 </note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1913 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1914
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1915 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1916 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1917
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1918 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1919 The directive has the following parameters:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1920 <list type="tag">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1921
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1922 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1923 <literal>max</literal>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1924 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1925 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1926 sets the maximum number of elements in the cache;
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1927 on cache overflow the least recently used (LRU) elements are removed;
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1928 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1929
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1930 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1931 <literal>inactive</literal>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1932 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1933 <tag-desc>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1934 defines a time after which an element is removed from the cache
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
1935 if it has not been accessed during this time;
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1936 by default, it is 60 seconds;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1937 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1938
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1939 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1940 <literal>off</literal>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1941 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1942 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1943 disables the cache.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1944 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1945
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1946 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1947 </para>
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 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1950 Example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1951 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1952 open_file_cache max=1000 inactive=20s;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1953 open_file_cache_valid 30s;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1954 open_file_cache_min_uses 2;
270
945d7299c26c Spaces are now preserved here, so removed all the hacks.
Ruslan Ermilov <ru@nginx.com>
parents: 252
diff changeset
1955 open_file_cache_errors on;<!--
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1956 open_file_cache_events on;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1957 -->
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1958 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1959 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1960
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1961 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1962
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1963
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1964 <directive name="open_file_cache_errors">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1965 <syntax><literal>on</literal> | <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1966 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1967 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1968 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1969 <context>location</context>
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 <para>
68
9de85defbcf8 - "optimize_server_names" is deprecated in favour of "server_name_in_redirects"
Ruslan Ermilov <ru@nginx.com>
parents: 67
diff changeset
1972 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
1973 <link id="open_file_cache"/>.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1974 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1975
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1976 </directive>
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 <!--
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1980
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1981 <directive name="open_file_cache_events">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1982 <syntax><literal>on</literal> | <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
1983 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1984 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1985 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1986 <context>location</context>
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 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1989 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
1990 <link id="open_file_cache"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1991 elements.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1992 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
1993 <link doc="../events.xml" id="kqueue"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1994 method only.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1995 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
1996 support events for arbitrary file system types.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1997 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
1998 file systems such as UFS or FFS.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1999 </para>
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 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2002
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2003 -->
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
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2006 <directive name="open_file_cache_min_uses">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2007 <syntax><value>number</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2008 <default>1</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2009 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2010 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2011 <context>location</context>
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 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2014 Sets the minimum <value>number</value> of file accesses during
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2015 the period configured by the <literal>inactive</literal> parameter
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2016 of the <link id="open_file_cache"/> directive, required for a file
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2017 descriptor to remain open in the cache.
57
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="open_file_cache_valid">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2024 <syntax><value>time</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2025 <default>60s</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 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
2032 <link id="open_file_cache"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2033 elements should be validated.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2034 <!--
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2035 When
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
2036 <link id="open_file_cache_events"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2037 is enabled, open file descriptors
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2038 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
2039 -->
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2040 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2041
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2042 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2043
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2044
1024
e47971bf6619 Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1023
diff changeset
2045 <directive name="output_buffers">
e47971bf6619 Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1023
diff changeset
2046 <syntax><value>number</value> <value>size</value></syntax>
1576
7f97ab081d24 Changed default value in the output_buffers directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1567
diff changeset
2047 <default>2 32k</default>
1024
e47971bf6619 Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1023
diff changeset
2048 <context>http</context>
e47971bf6619 Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1023
diff changeset
2049 <context>server</context>
e47971bf6619 Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1023
diff changeset
2050 <context>location</context>
e47971bf6619 Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1023
diff changeset
2051
e47971bf6619 Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1023
diff changeset
2052 <para>
1151
4c2324a7eeea Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1149
diff changeset
2053 Sets the <value>number</value> and <value>size</value> of the
1024
e47971bf6619 Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1023
diff changeset
2054 buffers used for reading a response from a disk.
1576
7f97ab081d24 Changed default value in the output_buffers directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1567
diff changeset
2055 <note>
7f97ab081d24 Changed default value in the output_buffers directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1567
diff changeset
2056 Prior to version 1.9.5, the default value was 1 32k.
7f97ab081d24 Changed default value in the output_buffers directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1567
diff changeset
2057 </note>
1024
e47971bf6619 Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1023
diff changeset
2058 </para>
e47971bf6619 Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1023
diff changeset
2059
e47971bf6619 Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1023
diff changeset
2060 </directive>
e47971bf6619 Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1023
diff changeset
2061
e47971bf6619 Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1023
diff changeset
2062
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2063 <directive name="port_in_redirect">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2064 <syntax><literal>on</literal> | <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2065 <default>on</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2066 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2067 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2068 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2069
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2070 <para>
1879
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
2071 Enables or disables specifying the port in
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
2072 <link id="absolute_redirect">absolute</link> redirects issued by nginx.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2073 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2074
159
8c124aef0041 Cross-linked "server_name_in_redirect" and "port_in_redirect" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 152
diff changeset
2075 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2076 The use of the primary server name in redirects is controlled by
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2077 the <link id="server_name_in_redirect"/> directive.
159
8c124aef0041 Cross-linked "server_name_in_redirect" and "port_in_redirect" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 152
diff changeset
2078 </para>
8c124aef0041 Cross-linked "server_name_in_redirect" and "port_in_redirect" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 152
diff changeset
2079
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2080 </directive>
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
175
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2083 <directive name="postpone_output">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2084 <syntax><value>size</value></syntax>
175
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2085 <default>1460</default>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2086 <context>http</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2087 <context>server</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2088 <context>location</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2089
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2090 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2091 If possible, the transmission of client data will be postponed until
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2092 nginx has at least <value>size</value> bytes of data to send.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2093 The zero value disables postponing data transmission.
175
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2094 </para>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2095
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2096 </directive>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2097
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2098
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2099 <directive name="read_ahead">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2100 <syntax><value>size</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2101 <default>0</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2102 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2103 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2104 <context>location</context>
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 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2107 Sets the amount of pre-reading for the kernel when working with file.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2108 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2109
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2110 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2111 On Linux, the
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2112 <literal>posix_fadvise(0, 0, 0, POSIX_FADV_SEQUENTIAL)</literal>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2113 system call is used, and so the <value>size</value> parameter is ignored.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2114 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2115
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2116 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2117 On FreeBSD, the
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2118 <literal>fcntl(O_READAHEAD,</literal>
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2119 <value>size</value><literal>)</literal>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2120 system call, supported since FreeBSD&nbsp;9.0-CURRENT, is used.
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2121 FreeBSD&nbsp;7 has to be
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2122 <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
2123 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2124
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2125 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2126
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2127
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2128 <directive name="recursive_error_pages">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2129 <syntax><literal>on</literal> | <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2130 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2131 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2132 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2133 <context>location</context>
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 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2136 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
2137 <link id="error_page"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2138 directive.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2139 The number of such redirects is <link id="internal">limited</link>.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2140 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2141
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2142 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2143
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2144
169
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
2145 <directive name="request_pool_size">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2146 <syntax><value>size</value></syntax>
169
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
2147 <default>4k</default>
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
2148 <context>http</context>
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
2149 <context>server</context>
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
2150
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
2151 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2152 Allows accurate tuning of per-request memory allocations.
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2153 This directive has minimal impact on performance
169
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
2154 and should not generally be used.
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
2155 </para>
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
2156
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
2157 </directive>
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
2158
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
2159
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2160 <directive name="reset_timedout_connection">
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
2161 <syntax><literal>on</literal> | <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2162 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2163 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2164 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2165 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2166
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2167 <para>
2390
655e7de7fd4b Documented "return 444" when reset_timedout_connection is on.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2384
diff changeset
2168 Enables or disables resetting timed out connections
655e7de7fd4b Documented "return 444" when reset_timedout_connection is on.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2384
diff changeset
2169 and connections
655e7de7fd4b Documented "return 444" when reset_timedout_connection is on.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2384
diff changeset
2170 <link doc="ngx_http_rewrite_module.xml" id="return">closed</link>
655e7de7fd4b Documented "return 444" when reset_timedout_connection is on.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2384
diff changeset
2171 with the non-standard code 444 (1.15.2).
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2172 The reset is performed as follows.
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2173 Before closing a socket, the
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2174 <c-def>SO_LINGER</c-def>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2175 option is set on it with a timeout value of 0.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2176 When the socket is closed, TCP RST is sent to the client, and all memory
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2177 occupied by this socket is released.
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2178 This helps avoid keeping an already closed socket with filled buffers
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2179 in a FIN_WAIT1 state for a long time.
57
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>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2183 It should be noted that timed out keep-alive connections are
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2184 closed normally.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2185 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2186
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2187 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2188
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 <directive name="resolver">
185
05e7496801ec Documented recent changes in the "resolver" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 176
diff changeset
2191 <syntax>
1031
f7f23f5928ef Documented "resolver ipv6=" parameter.
Ruslan Ermilov <ru@nginx.com>
parents: 1024
diff changeset
2192 <value>address</value> ...
f7f23f5928ef Documented "resolver ipv6=" parameter.
Ruslan Ermilov <ru@nginx.com>
parents: 1024
diff changeset
2193 [<literal>valid</literal>=<value>time</value>]
2870
e06cf66a9f63 Documented the "ipv4=off" parameter of the "resolver" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2831
diff changeset
2194 [<literal>ipv4</literal>=<literal>on</literal>|<literal>off</literal>]
2424
dd3ac7eefeed Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2391
diff changeset
2195 [<literal>ipv6</literal>=<literal>on</literal>|<literal>off</literal>]
dd3ac7eefeed Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2391
diff changeset
2196 [<literal>status_zone</literal>=<value>zone</value>]</syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2197 <default/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2198 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2199 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2200 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2201
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2202 <para>
527
58d79f8c412d Documented 1.3.1 changes in "resolver".
Ruslan Ermilov <ru@nginx.com>
parents: 522
diff changeset
2203 Configures name servers used to resolve names of upstream servers
58d79f8c412d Documented 1.3.1 changes in "resolver".
Ruslan Ermilov <ru@nginx.com>
parents: 522
diff changeset
2204 into addresses, for example:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2205 <example>
527
58d79f8c412d Documented 1.3.1 changes in "resolver".
Ruslan Ermilov <ru@nginx.com>
parents: 522
diff changeset
2206 resolver 127.0.0.1 [::1]:5353;
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2207 </example>
2452
4487310de7e7 Added IDs to resolver parameters, minor language fixes in resolver.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2450
diff changeset
2208 The address can be specified as a domain name or IP address,
4487310de7e7 Added IDs to resolver parameters, minor language fixes in resolver.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2450
diff changeset
2209 with an optional port (1.3.1, 1.2.2).
527
58d79f8c412d Documented 1.3.1 changes in "resolver".
Ruslan Ermilov <ru@nginx.com>
parents: 522
diff changeset
2210 If port is not specified, the port 53 is used.
143
370cf5ccd3ca The "resolver" directive now allows specifying multiple name servers.
Ruslan Ermilov <ru@nginx.com>
parents: 140
diff changeset
2211 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
2212 <note>
370cf5ccd3ca The "resolver" directive now allows specifying multiple name servers.
Ruslan Ermilov <ru@nginx.com>
parents: 140
diff changeset
2213 Before version 1.1.7, only a single name server could be configured.
527
58d79f8c412d Documented 1.3.1 changes in "resolver".
Ruslan Ermilov <ru@nginx.com>
parents: 522
diff changeset
2214 Specifying name servers using IPv6 addresses is supported
566
f8148fc88224 Documented 1.2.2 changes.
Ruslan Ermilov <ru@nginx.com>
parents: 553
diff changeset
2215 starting from versions 1.3.1 and 1.2.2.
143
370cf5ccd3ca The "resolver" directive now allows specifying multiple name servers.
Ruslan Ermilov <ru@nginx.com>
parents: 140
diff changeset
2216 </note>
2452
4487310de7e7 Added IDs to resolver parameters, minor language fixes in resolver.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2450
diff changeset
2217 </para>
4487310de7e7 Added IDs to resolver parameters, minor language fixes in resolver.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2450
diff changeset
2218
4487310de7e7 Added IDs to resolver parameters, minor language fixes in resolver.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2450
diff changeset
2219 <para id="resolver_ipv6">
1031
f7f23f5928ef Documented "resolver ipv6=" parameter.
Ruslan Ermilov <ru@nginx.com>
parents: 1024
diff changeset
2220 By default, nginx will look up both IPv4 and IPv6 addresses while resolving.
2870
e06cf66a9f63 Documented the "ipv4=off" parameter of the "resolver" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2831
diff changeset
2221 If looking up of IPv4 or IPv6 addresses is not desired,
e06cf66a9f63 Documented the "ipv4=off" parameter of the "resolver" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2831
diff changeset
2222 the <literal>ipv4=off</literal> (1.23.1) or
1031
f7f23f5928ef Documented "resolver ipv6=" parameter.
Ruslan Ermilov <ru@nginx.com>
parents: 1024
diff changeset
2223 the <literal>ipv6=off</literal> parameter can be specified.
f7f23f5928ef Documented "resolver ipv6=" parameter.
Ruslan Ermilov <ru@nginx.com>
parents: 1024
diff changeset
2224 <note>
f7f23f5928ef Documented "resolver ipv6=" parameter.
Ruslan Ermilov <ru@nginx.com>
parents: 1024
diff changeset
2225 Resolving of names into IPv6 addresses is supported
f7f23f5928ef Documented "resolver ipv6=" parameter.
Ruslan Ermilov <ru@nginx.com>
parents: 1024
diff changeset
2226 starting from version 1.5.8.
f7f23f5928ef Documented "resolver ipv6=" parameter.
Ruslan Ermilov <ru@nginx.com>
parents: 1024
diff changeset
2227 </note>
2452
4487310de7e7 Added IDs to resolver parameters, minor language fixes in resolver.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2450
diff changeset
2228 </para>
4487310de7e7 Added IDs to resolver parameters, minor language fixes in resolver.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2450
diff changeset
2229
4487310de7e7 Added IDs to resolver parameters, minor language fixes in resolver.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2450
diff changeset
2230 <para id="resolver_valid">
185
05e7496801ec Documented recent changes in the "resolver" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 176
diff changeset
2231 By default, nginx caches answers using the TTL value of a response.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2232 An optional <literal>valid</literal> parameter allows overriding it:
185
05e7496801ec Documented recent changes in the "resolver" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 176
diff changeset
2233 <example>
527
58d79f8c412d Documented 1.3.1 changes in "resolver".
Ruslan Ermilov <ru@nginx.com>
parents: 522
diff changeset
2234 resolver 127.0.0.1 [::1]:5353 valid=30s;
185
05e7496801ec Documented recent changes in the "resolver" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 176
diff changeset
2235 </example>
05e7496801ec Documented recent changes in the "resolver" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 176
diff changeset
2236 <note>
05e7496801ec Documented recent changes in the "resolver" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 176
diff changeset
2237 Before version 1.1.9, tuning of caching time was not possible,
05e7496801ec Documented recent changes in the "resolver" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 176
diff changeset
2238 and nginx always cached answers for the duration of 5 minutes.
05e7496801ec Documented recent changes in the "resolver" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 176
diff changeset
2239 </note>
1770
ae46e57cecba Added note to the "resover" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1763
diff changeset
2240 <note>
ae46e57cecba Added note to the "resover" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1763
diff changeset
2241 To prevent DNS spoofing, it is recommended
ae46e57cecba Added note to the "resover" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1763
diff changeset
2242 configuring DNS servers in a properly secured trusted local network.
ae46e57cecba Added note to the "resover" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1763
diff changeset
2243 </note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2244 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2245
2424
dd3ac7eefeed Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2391
diff changeset
2246 <para id="resolver_status_zone">
dd3ac7eefeed Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2391
diff changeset
2247 The optional <literal>status_zone</literal> parameter (1.17.1)
dd3ac7eefeed Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2391
diff changeset
2248 enables
dd3ac7eefeed Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2391
diff changeset
2249 <link doc="ngx_http_api_module.xml" id="resolvers_">collection</link>
dd3ac7eefeed Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2391
diff changeset
2250 of DNS server statistics of requests and responses
dd3ac7eefeed Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2391
diff changeset
2251 in the specified <value>zone</value>.
dd3ac7eefeed Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2391
diff changeset
2252 The parameter is available as part of our
dd3ac7eefeed Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2391
diff changeset
2253 <commercial_version>commercial subscription</commercial_version>.
dd3ac7eefeed Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2391
diff changeset
2254 </para>
dd3ac7eefeed Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2391
diff changeset
2255
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2256 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2257
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2258
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2259 <directive name="resolver_timeout">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2260 <syntax><value>time</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2261 <default>30s</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2262 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2263 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2264 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2265
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2266 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2267 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
2268 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2269 resolver_timeout 5s;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2270 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2271 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2272
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2273 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2274
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2275
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2276 <directive name="root">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2277 <syntax><value>path</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2278 <default>html</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2279 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2280 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2281 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2282 <context>if in location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2283
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2284 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2285 Sets the root directory for requests.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2286 For example, with the following configuration
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2287 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2288 location /i/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2289 root /data/w3;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2290 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2291 </example>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2292 The <path>/data/w3/i/top.gif</path> file will be sent in response to
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2293 the “<literal>/i/top.gif</literal>” request.
57
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
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2296 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2297 The <value>path</value> value can contain variables,
69
935beaa561b3 - use of $document_root and $realpath_root in "root" is prohibited
Ruslan Ermilov <ru@nginx.com>
parents: 68
diff changeset
2298 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
2299 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2300
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2301 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2302 A path to the file is constructed by merely adding a URI to the value
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2303 of the <literal>root</literal> directive.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2304 If a URI has 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
2305 <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
2306 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2307
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2308 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2309
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2310
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2311 <directive name="satisfy">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2312 <syntax><literal>all</literal> | <literal>any</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2313 <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
2314 <context>http</context>
935beaa561b3 - use of $document_root and $realpath_root in "root" is prohibited
Ruslan Ermilov <ru@nginx.com>
parents: 68
diff changeset
2315 <context>server</context>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2316 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2317
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2318 <para>
971
6316a7579448 Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents: 966
diff changeset
2319 Allows access if all (<literal>all</literal>) or at least one
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2320 (<literal>any</literal>) of the
971
6316a7579448 Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents: 966
diff changeset
2321 <link doc="ngx_http_access_module.xml">ngx_http_access_module</link>,
1763
a7974b8d2a23 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1732
diff changeset
2322 <link doc="ngx_http_auth_basic_module.xml">ngx_http_auth_basic_module</link>,
a7974b8d2a23 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1732
diff changeset
2323 <link doc="ngx_http_auth_request_module.xml">ngx_http_auth_request_module</link>,
a7974b8d2a23 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1732
diff changeset
2324 or
a7974b8d2a23 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1732
diff changeset
2325 <link doc="ngx_http_auth_jwt_module.xml">ngx_http_auth_jwt_module</link>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2326 modules allow access.
246
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
2327 </para>
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
2328
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
2329 <para>
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
2330 Example:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2331 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2332 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2333 satisfy any;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2334
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2335 allow 192.168.1.0/32;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2336 deny all;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2337
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2338 auth_basic "closed site";
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2339 auth_basic_user_file conf/htpasswd;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2340 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2341 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2342 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2343
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2344 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2345
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2346
176
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2347 <directive name="send_lowat">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2348 <syntax><value>size</value></syntax>
176
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2349 <default>0</default>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2350 <context>http</context>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2351 <context>server</context>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2352 <context>location</context>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2353
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2354 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2355 If the directive is set to a non-zero value, nginx will try to minimize
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2356 the number of send operations on client sockets by using either
553
6330ca27a485 Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents: 541
diff changeset
2357 <c-def>NOTE_LOWAT</c-def> flag of the
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2358 <link doc="../events.xml" id="kqueue"/> method
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2359 or the <c-def>SO_SNDLOWAT</c-def> socket option.
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2360 In both cases the specified <value>size</value> is used.
176
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2361 </para>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2362
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2363 <para>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2364 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
2365 </para>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2366
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2367 </directive>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2368
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2369
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2370 <directive name="send_timeout">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2371 <syntax><value>time</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2372 <default>60s</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2373 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2374 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2375 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2376
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2377 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2378 Sets a timeout for transmitting a response to the client.
1149
1501e5848052 Corrected the usage of the definite article.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1132
diff changeset
2379 The timeout is set only between two successive write operations,
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2380 not for the transmission of the whole response.
1149
1501e5848052 Corrected the usage of the definite article.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1132
diff changeset
2381 If the client does not receive anything within this time,
1501e5848052 Corrected the usage of the definite article.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1132
diff changeset
2382 the connection is closed.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2383 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2384
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2385 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2386
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2387
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2388 <directive name="sendfile">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2389
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2390 <syntax><literal>on</literal> | <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2391 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2392 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2393 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2394 <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
2395 <context>if in location</context>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2396
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2397 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2398 Enables or disables the use of
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2399 <c-func>sendfile</c-func>.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2400 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2401
1432
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2402 <para>
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2403 Starting from nginx&nbsp;0.8.12 and FreeBSD&nbsp;5.2.1,
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2404 <link id="aio"/> can be used to pre-load data
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2405 for <c-func>sendfile</c-func>:
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2406 <example>
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2407 location /video/ {
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2408 sendfile on;
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2409 tcp_nopush on;
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2410 aio on;
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2411 }
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2412 </example>
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2413 In this configuration, <c-func>sendfile</c-func> is called with
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2414 the <c-def>SF_NODISKIO</c-def> flag which causes it not to block on disk I/O,
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2415 but, instead, report back that the data are not in memory.
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2416 nginx then initiates an asynchronous data load by reading one byte.
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2417 On the first read, the FreeBSD kernel loads the first 128K bytes
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2418 of a file into memory, although next reads will only load data in 16K chunks.
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2419 This can be changed using the
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2420 <link id="read_ahead"/> directive.
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2421 <note>
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2422 Before version 1.7.11, pre-loading could be enabled with
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2423 <literal>aio sendfile;</literal>.
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2424 </note>
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2425 </para>
9012d7935c9b Documented that "aio sendfile" is deprecated.
Ruslan Ermilov <ru@nginx.com>
parents: 1430
diff changeset
2426
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2427 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2428
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2429
175
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2430 <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
2431
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2432 <syntax><value>size</value></syntax>
2793
4934cbc1db19 Changed default value of sendfile_max_chunk to 2m.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
2433 <default>2m</default>
175
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2434 <context>http</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2435 <context>server</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2436 <context>location</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2437
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2438 <para>
2793
4934cbc1db19 Changed default value of sendfile_max_chunk to 2m.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
2439 Limits the amount of data that can be
175
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2440 transferred in a single <c-func>sendfile</c-func> call.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2441 Without the limit, one fast connection may seize the worker process entirely.
2793
4934cbc1db19 Changed default value of sendfile_max_chunk to 2m.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
2442 <note>
4934cbc1db19 Changed default value of sendfile_max_chunk to 2m.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
2443 Prior to version 1.21.4, by default there was no limit.
4934cbc1db19 Changed default value of sendfile_max_chunk to 2m.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2724
diff changeset
2444 </note>
175
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2445 </para>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2446
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2447 </directive>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2448
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2449
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2450 <directive name="server">
108
72524ae53106 Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents: 106
diff changeset
2451 <syntax block="yes"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2452 <default/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2453 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2454
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2455 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2456 Sets configuration for a virtual server.
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2457 There is no clear separation between IP-based (based on the IP address)
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2458 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
2459 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
2460 Instead, the <link id="listen"/> directives describe all
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2461 addresses and ports that should accept connections for the 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
2462 <link id="server_name"/> directive lists all server names.
522
ef11546f75ee Translated "request_processing" into Russian, removed "virtual_hosts"
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
2463 Example configurations are provided in the
ef11546f75ee Translated "request_processing" into Russian, removed "virtual_hosts"
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
2464 “<link doc="request_processing.xml"/>” document.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2465 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2466
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2467 </directive>
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
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2470 <directive name="server_name">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2471 <syntax><value>name</value> ...</syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2472 <default>""</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2473 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2474
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2475 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2476 Sets names of a virtual server, for example:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2477 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2478 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2479 server_name example.com www.example.com;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2480 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2481 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2482 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2483
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2484 <para>
70
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
2485 The first name becomes the primary server name.
628
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2486 </para>
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2487
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2488 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2489 Server names can include an asterisk (“<literal>*</literal>”)
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2490 replacing the first or last part of a name:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2491 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2492 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2493 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
2494 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2495 </example>
628
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2496 Such names are called wildcard names.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2497 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2498
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2499 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2500 The first two of the names mentioned above can be combined in one:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2501 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2502 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2503 server_name .example.com;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2504 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2505 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2506 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2507
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2508 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2509 It is also possible to use regular expressions in server names,
1101
ebe027a963f4 Typo fixed.
Andrei Belov <defan@nginx.com>
parents: 1097
diff changeset
2510 preceding the name with a tilde (“<literal>~</literal>”):
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2511 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2512 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2513 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
2514 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2515 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2516 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2517
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2518 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2519 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
2520 be used in other directives:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2521 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2522 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2523 server_name ~^(www\.)?(.+)$;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2524
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2525 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2526 root /sites/$2;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2527 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2528 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2529
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2530 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2531 server_name _;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2532
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2533 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2534 root /sites/default;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2535 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2536 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2537 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2538 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2539
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2540 <para>
70
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
2541 Named captures in regular expressions create variables (0.8.25)
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
2542 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
2543 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2544 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2545 server_name ~^(www\.)?(?&lt;domain&gt;.+)$;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2546
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2547 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2548 root /sites/$domain;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2549 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2550 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2551
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2552 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2553 server_name _;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2554
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2555 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2556 root /sites/default;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2557 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2558 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2559 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2560 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2561
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2562 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2563 If the directive’s parameter is set to “<var>$hostname</var>” (0.9.4), the
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2564 machine’s hostname is inserted.
628
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2565 </para>
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2566
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2567 <para>
70
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
2568 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
2569 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2570 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2571 server_name www.example.com "";
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2572 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2573 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2574 It allows this server to process requests without the <header>Host</header>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2575 header field — 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
2576 This is the default setting.
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
2577 <note>
625
af3f38e349eb Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents: 617
diff changeset
2578 Before 0.8.48, the machine’s hostname was used by default.
70
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
2579 </note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2580 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2581
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2582 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2583 During searching for a virtual server by name,
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2584 if the name matches more than one of the specified variants,
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2585 (e.g. both a wildcard name and regular expression match), the first matching
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2586 variant will be chosen, in the following order of priority:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2587 <list type="enum">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2588
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2589 <listitem>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2590 the exact name
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2591 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2592
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2593 <listitem>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2594 the longest wildcard name starting with an asterisk,
587
5bb7716cae7e Documented in more depth how server names are matched.
Ruslan Ermilov <ru@nginx.com>
parents: 580
diff changeset
2595 e.g. “<literal>*.example.com</literal>”
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2596 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2597
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2598 <listitem>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2599 the longest wildcard name ending with an asterisk,
587
5bb7716cae7e Documented in more depth how server names are matched.
Ruslan Ermilov <ru@nginx.com>
parents: 580
diff changeset
2600 e.g. “<literal>mail.*</literal>”
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2601 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2602
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2603 <listitem>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2604 the first matching regular expression
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2605 (in order of appearance in the configuration file)
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2606 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2607
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2608 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2609 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2610
628
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2611 <para>
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2612 Detailed description of server names is provided in a separate
628
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2613 <link doc="server_names.xml"/> document.
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2614 </para>
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2615
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2616 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2617
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2618
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2619 <directive name="server_name_in_redirect">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2620 <syntax><literal>on</literal> | <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2621 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2622 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2623 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2624 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2625
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2626 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2627 Enables or disables the use of the primary server name, specified by the
1879
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
2628 <link id="server_name"/> directive,
3685d90e133e Documented the "absolute_redirect" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1859
diff changeset
2629 in <link id="absolute_redirect">absolute</link> redirects issued by nginx.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2630 When the use of the primary server name is disabled, the name from the
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2631 <header>Host</header> request header field is used.
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2632 If this field is not present, the IP address of the server is used.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2633 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2634
159
8c124aef0041 Cross-linked "server_name_in_redirect" and "port_in_redirect" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 152
diff changeset
2635 <para>
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2636 The use of a port in redirects is controlled by
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2637 the <link id="port_in_redirect"/> directive.
159
8c124aef0041 Cross-linked "server_name_in_redirect" and "port_in_redirect" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 152
diff changeset
2638 </para>
8c124aef0041 Cross-linked "server_name_in_redirect" and "port_in_redirect" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 152
diff changeset
2639
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2640 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2641
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2642
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2643 <directive name="server_names_hash_bucket_size">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2644 <syntax><value>size</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2645 <default>32|64|128</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2646 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2647
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2648 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2649 Sets the bucket size for the server names hash tables.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2650 The default value depends on the size of the processor’s cache line.
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 958
diff changeset
2651 The details of setting up hash tables are provided in a separate
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2652 <link doc="../hash.xml">document</link>.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2653 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2654
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2655 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2656
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2657
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2658 <directive name="server_names_hash_max_size">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2659 <syntax><value>size</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2660 <default>512</default>
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2661 <context>http</context>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2662
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2663 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2664 Sets the maximum <value>size</value> of the server names hash tables.
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 958
diff changeset
2665 The details of setting up hash tables are provided in a separate
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2666 <link doc="../hash.xml">document</link>.
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2667 </para>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2668
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2669 </directive>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2670
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2671
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2672 <directive name="server_tokens">
1680
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1665
diff changeset
2673 <syntax>
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1665
diff changeset
2674 <literal>on</literal> |
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1665
diff changeset
2675 <literal>off</literal> |
1904
d59199b0c022 Documented the "build" parameter of the "server_tokens" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1903
diff changeset
2676 <literal>build</literal> |
1680
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1665
diff changeset
2677 <value>string</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2678 <default>on</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2679 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2680 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2681 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2682
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2683 <para>
1903
da00a2526415 Replaced "error messages" with "error pages" in server_tokens.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1879
diff changeset
2684 Enables or disables emitting nginx version on error pages and in the
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2685 <header>Server</header> response header field.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2686 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2687
1904
d59199b0c022 Documented the "build" parameter of the "server_tokens" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1903
diff changeset
2688 <para id="server_tokens_build">
1953
408eed0bf491 Clarified description of server_tokens build.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1923
diff changeset
2689 The <literal>build</literal> parameter (1.11.10) enables emitting
408eed0bf491 Clarified description of server_tokens build.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1923
diff changeset
2690 a <link doc="../configure.xml" id="build">build name</link>
408eed0bf491 Clarified description of server_tokens build.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1923
diff changeset
2691 along with nginx version.
1904
d59199b0c022 Documented the "build" parameter of the "server_tokens" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1903
diff changeset
2692 </para>
d59199b0c022 Documented the "build" parameter of the "server_tokens" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1903
diff changeset
2693
1680
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1665
diff changeset
2694 <para>
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1665
diff changeset
2695 Additionally, as part of our
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1665
diff changeset
2696 <commercial_version>commercial subscription</commercial_version>,
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1665
diff changeset
2697 starting from version 1.9.13
1903
da00a2526415 Replaced "error messages" with "error pages" in server_tokens.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1879
diff changeset
2698 the signature on error pages and
1680
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1665
diff changeset
2699 the <header>Server</header> response header field value
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1665
diff changeset
2700 can be set explicitly using the <value>string</value> with variables.
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1665
diff changeset
2701 An empty string disables the emission of the <header>Server</header> field.
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1665
diff changeset
2702 </para>
57c3f36b3b6a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 1665
diff changeset
2703
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2704 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2705
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2706
2118
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2707 <directive name="subrequest_output_buffer_size">
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2708 <syntax><value>size</value></syntax>
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2709 <default>4k|8k</default>
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2710 <context>http</context>
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2711 <context>server</context>
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2712 <context>location</context>
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2713 <appeared-in>1.13.10</appeared-in>
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2714
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2715 <para>
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2716 Sets the <value>size</value> of the buffer used for
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2717 storing the response body of a subrequest.
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2718 By default, the buffer size is equal to one memory page.
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2719 This is either 4K or 8K, depending on a platform.
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2720 It can be made smaller, however.
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2721 </para>
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2722
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2723 <para>
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2724 The directive is applicable only for subrequests
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2725 with response bodies saved into memory.
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2726 For example, such subrequests are created by
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2727 <link doc="ngx_http_ssi_module.xml" id="ssi_include_set">SSI</link>.
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2728 </para>
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2729
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2730 </directive>
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2731
0b3103eabdf1 Documented the "subrequest_output_buffer_size" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2039
diff changeset
2732
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2733 <directive name="tcp_nodelay">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2734 <syntax><literal>on</literal> | <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2735 <default>on</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2736 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2737 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2738 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2739
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2740 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2741 Enables or disables the use of the <c-def>TCP_NODELAY</c-def> option.
2121
cf9e3d2893b6 Fixed description of the http tcp_nodelay directive.
Ruslan Ermilov <ru@nginx.com>
parents: 2118
diff changeset
2742 The option is enabled when a connection is transitioned into the
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2743 keep-alive state.
2121
cf9e3d2893b6 Fixed description of the http tcp_nodelay directive.
Ruslan Ermilov <ru@nginx.com>
parents: 2118
diff changeset
2744 Additionally, it is enabled on SSL connections,
cf9e3d2893b6 Fixed description of the http tcp_nodelay directive.
Ruslan Ermilov <ru@nginx.com>
parents: 2118
diff changeset
2745 for unbuffered proxying,
cf9e3d2893b6 Fixed description of the http tcp_nodelay directive.
Ruslan Ermilov <ru@nginx.com>
parents: 2118
diff changeset
2746 and for <link doc="websocket.xml">WebSocket</link> proxying.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2747 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2748
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2749 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2750
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2751
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2752 <directive name="tcp_nopush">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2753 <syntax><literal>on</literal> | <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2754 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2755 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2756 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2757 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2758
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2759 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2760 Enables or disables the use of
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2761 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
2762 or the <c-def>TCP_CORK</c-def> socket option on Linux.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2763 The options are enabled only when <link id="sendfile"/> is used.
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2764 Enabling the option allows
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2765 <list type="bullet">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2766
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2767 <listitem>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2768 sending the response header and the beginning of a file in one packet,
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2769 on Linux and FreeBSD&nbsp;4.*;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2770 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2771
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2772 <listitem>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2773 sending a file in full packets.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2774 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2775
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2776 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2777 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2778
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2779 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2780
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2781
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2782 <directive name="try_files">
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
2783 <syntax><value>file</value> ... <value>uri</value></syntax>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
2784 <syntax><value>file</value> ... =<value>code</value></syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2785 <default/>
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2786 <context>server</context>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2787 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2788
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2789 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2790 Checks the existence of files in the specified order and uses
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2791 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
2792 is performed in the current context.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2793 The path to a file is constructed from the
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2794 <value>file</value> parameter
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
2795 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
2796 <link id="root"/> and <link id="alias"/> directives.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2797 It is possible to check directory’s existence by specifying
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2798 a slash at the end of a name, e.g. “<literal>$uri/</literal>”.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2799 If none of the files were found, an internal redirect to the
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2800 <value>uri</value> specified in the last parameter is made.
173
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2801 For example:
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2802 <example>
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2803 location /images/ {
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2804 try_files $uri /images/default.gif;
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2805 }
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2806
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2807 location = /images/default.gif {
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2808 expires 30s;
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2809 }
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2810 </example>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2811 The last parameter can also point to a named location,
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2812 as shown in examples below.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2813 Starting from version 0.7.51, the last parameter can also be a
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2814 <value>code</value>:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2815 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2816 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2817 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
2818 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2819 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2820 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2821
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2822 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2823 Example in proxying Mongrel:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2824 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2825 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2826 try_files /system/maintenance.html
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2827 $uri $uri/index.html $uri.html
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2828 @mongrel;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2829 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2830
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2831 location @mongrel {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2832 proxy_pass http://mongrel;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2833 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2834 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2835 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2836
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2837 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2838 Example for Drupal/FastCGI:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2839 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2840 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2841 try_files $uri $uri/ @drupal;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2842 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2843
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2844 location ~ \.php$ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2845 try_files $uri @drupal;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2846
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2847 fastcgi_pass ...;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2848
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2849 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
2850 fastcgi_param SCRIPT_NAME $fastcgi_script_name;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2851 fastcgi_param QUERY_STRING $args;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2852
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2853 ... other fastcgi_param's
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2854 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2855
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2856 location @drupal {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2857 fastcgi_pass ...;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2858
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2859 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
2860 fastcgi_param SCRIPT_NAME /index.php;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2861 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
2862
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2863 ... other fastcgi_param's
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2864 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2865 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2866 In the following example,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2867 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2868 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2869 try_files $uri $uri/ @drupal;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2870 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2871 </example>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2872 the <literal>try_files</literal> directive is equivalent to
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2873 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2874 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2875 error_page 404 = @drupal;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2876 log_not_found off;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2877 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2878 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2879 And here,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2880 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2881 location ~ \.php$ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2882 try_files $uri @drupal;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2883
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2884 fastcgi_pass ...;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2885
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2886 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
2887
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2888 ...
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2889 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2890 </example>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2891 <literal>try_files</literal> checks the existence of the PHP file
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2892 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
2893 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2894
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2895 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2896 Example for Wordpress and Joomla:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2897 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2898 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2899 try_files $uri $uri/ @wordpress;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2900 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2901
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2902 location ~ \.php$ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2903 try_files $uri @wordpress;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2904
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2905 fastcgi_pass ...;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2906
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2907 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
2908 ... other fastcgi_param's
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2909 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2910
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2911 location @wordpress {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2912 fastcgi_pass ...;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2913
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2914 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
2915 ... other fastcgi_param's
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2916 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2917 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2918 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2919
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2920 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2921
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2922
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2923 <directive name="types">
108
72524ae53106 Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents: 106
diff changeset
2924 <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
2925 <default>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2926 text/html html;
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2927 image/gif gif;
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2928 image/jpeg jpg;
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2929 </default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2930 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2931 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2932 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2933
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2934 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2935 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
2936 Extensions are case-insensitive.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2937 Several extensions can be mapped to one type, for example:
160
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2938 <example>
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2939 types {
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2940 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
2941 application/octet-stream deb;
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2942 application/octet-stream dmg;
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2943 }
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2944 </example>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2945 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2946
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2947 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2948 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
2949 <path>conf/mime.types</path> file.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2950 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2951
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2952 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2953 To make a particular location emit the
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2954 “<literal>application/octet-stream</literal>”
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
2955 MIME type for all requests, the following configuration can be used:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2956 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2957 location /download/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2958 types { }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2959 default_type application/octet-stream;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2960 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2961 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2962 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2963
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2964 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2965
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2966
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2967 <directive name="types_hash_bucket_size">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2968 <syntax><value>size</value></syntax>
1132
8bdb4eb27f48 Documented the new default of "types_hash_bucket_size".
Ruslan Ermilov <ru@nginx.com>
parents: 1110
diff changeset
2969 <default>64</default>
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2970 <context>http</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2971 <context>server</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2972 <context>location</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2973
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2974 <para>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2975 Sets the bucket size for the types hash tables.
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 958
diff changeset
2976 The details of setting up hash tables are provided in a separate
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2977 <link doc="../hash.xml">document</link>.
1132
8bdb4eb27f48 Documented the new default of "types_hash_bucket_size".
Ruslan Ermilov <ru@nginx.com>
parents: 1110
diff changeset
2978 <note>
8bdb4eb27f48 Documented the new default of "types_hash_bucket_size".
Ruslan Ermilov <ru@nginx.com>
parents: 1110
diff changeset
2979 Prior to version 1.5.13,
8bdb4eb27f48 Documented the new default of "types_hash_bucket_size".
Ruslan Ermilov <ru@nginx.com>
parents: 1110
diff changeset
2980 the default value depended on the size of the processor’s cache line.
8bdb4eb27f48 Documented the new default of "types_hash_bucket_size".
Ruslan Ermilov <ru@nginx.com>
parents: 1110
diff changeset
2981 </note>
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2982 </para>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2983
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2984 </directive>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2985
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2986
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2987 <directive name="types_hash_max_size">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2988 <syntax><value>size</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2989 <default>1024</default>
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2990 <context>http</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2991 <context>server</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2992 <context>location</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2993
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2994 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2995 Sets the maximum <value>size</value> of the types hash tables.
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 958
diff changeset
2996 The details of setting up hash tables are provided in a separate
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2997 <link doc="../hash.xml">document</link>.
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2998 </para>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2999
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
3000 </directive>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
3001
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
3002
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3003 <directive name="underscores_in_headers">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
3004 <syntax><literal>on</literal> | <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
3005 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3006 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3007 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3008
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3009 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3010 Enables or disables the use of underscores in client request header fields.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
3011 When the use of underscores is disabled, request header fields whose names
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
3012 contain underscores are
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
3013 marked as invalid and become subject to the
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
3014 <link id="ignore_invalid_headers"/> directive.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3015 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3016
426
1d6dc85ed324 Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents: 419
diff changeset
3017 <para>
1023
375055da60fa Improved wording of merge_slashes etc. (ticket #448).
Maxim Dounin <mdounin@mdounin.ru>
parents: 1022
diff changeset
3018 If the directive is specified on the <link id="server"/> level,
2795
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
3019 the value from the default server can be used.
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
3020 Details are provided in the
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
3021 “<link doc="server_names.xml" id="virtual_server_selection">Virtual
691de23367a7 Added link to "Virtual server Selection" in buffer directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2793
diff changeset
3022 server selection</link>” section.
426
1d6dc85ed324 Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents: 419
diff changeset
3023 </para>
1d6dc85ed324 Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents: 419
diff changeset
3024
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3025 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3026
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
3027
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
3028 <directive name="variables_hash_bucket_size">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
3029 <syntax><value>size</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
3030 <default>64</default>
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
3031 <context>http</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
3032
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
3033 <para>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
3034 Sets the bucket size for the variables hash table.
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 958
diff changeset
3035 The details of setting up hash tables are provided in a separate
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
3036 <link doc="../hash.xml">document</link>.
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
3037 </para>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
3038
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
3039 </directive>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
3040
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
3041
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
3042 <directive name="variables_hash_max_size">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
3043 <syntax><value>size</value></syntax>
1108
a0543e9213e7 New default value for the variables_hash_max_size directive.
Andrei Belov <defan@nginx.com>
parents: 1101
diff changeset
3044 <default>1024</default>
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
3045 <context>http</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
3046
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
3047 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
3048 Sets the maximum <value>size</value> of the variables hash table.
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 958
diff changeset
3049 The details of setting up hash tables are provided in a separate
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
3050 <link doc="../hash.xml">document</link>.
1108
a0543e9213e7 New default value for the variables_hash_max_size directive.
Andrei Belov <defan@nginx.com>
parents: 1101
diff changeset
3051 <note>
a0543e9213e7 New default value for the variables_hash_max_size directive.
Andrei Belov <defan@nginx.com>
parents: 1101
diff changeset
3052 Prior to version 1.5.13, the default value was 512.
a0543e9213e7 New default value for the variables_hash_max_size directive.
Andrei Belov <defan@nginx.com>
parents: 1101
diff changeset
3053 </note>
1110
4a4fe2d79d14 a0543e9213e7 nit fixed: "note" block moved inside "para".
Maxim Konovalov <maxim@nginx.com>
parents: 1108
diff changeset
3054 </para>
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
3055
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
3056 </directive>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
3057
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3058 </section>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3059
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
3060
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3061 <section id="variables" name="Embedded Variables">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3062
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3063 <para>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
3064 The <literal>ngx_http_core_module</literal> module supports embedded variables
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
3065 with names matching the Apache Server variables.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3066 First of all, these are variables representing client request header
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
3067 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
3068 and so on.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
3069 Also there are other variables:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3070 <list type="tag">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3071
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3072 <tag-name id="var_arg_"><var>$arg_</var><value>name</value></tag-name>
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
3073 <tag-desc>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
3074 argument <value>name</value> in the request line
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
3075 </tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
3076
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3077 <tag-name id="var_args"><var>$args</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3078 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3079 arguments in the request line
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3080 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3081
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3082 <tag-name id="var_binary_remote_addr"><var>$binary_remote_addr</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3083 <tag-desc>
625
af3f38e349eb Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents: 617
diff changeset
3084 client address in a binary form, value’s length is always 4 bytes
1699
6c96a644b0b3 Corrected description of $binary_remote_addr and saved state.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1692
diff changeset
3085 for IPv4 addresses or 16 bytes for IPv6 addresses
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3086 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3087
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3088 <tag-name id="var_body_bytes_sent"><var>$body_bytes_sent</var></tag-name>
86
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
3089 <tag-desc>
769
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
3090 number of bytes sent to a client, not counting the response header;
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
3091 this variable is compatible with the “<literal>%B</literal>” parameter of the
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
3092 <literal>mod_log_config</literal>
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
3093 Apache module
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
3094 </tag-desc>
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
3095
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
3096 <tag-name id="var_bytes_sent"><var>$bytes_sent</var></tag-name>
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
3097 <tag-desc>
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
3098 number of bytes sent to a client (1.3.8, 1.2.5)
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
3099 </tag-desc>
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
3100
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
3101 <tag-name id="var_connection"><var>$connection</var></tag-name>
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
3102 <tag-desc>
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
3103 connection serial number (1.3.8, 1.2.5)
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
3104 </tag-desc>
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
3105
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
3106 <tag-name id="var_connection_requests"><var>$connection_requests</var></tag-name>
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
3107 <tag-desc>
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
3108 current number of requests made through a connection (1.3.8, 1.2.5)
86
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
3109 </tag-desc>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
3110
2707
c1d62e514b3c Documented the $connection_time variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2706
diff changeset
3111 <tag-name id="var_connection_time"><var>$connection_time</var></tag-name>
c1d62e514b3c Documented the $connection_time variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2706
diff changeset
3112 <tag-desc>
c1d62e514b3c Documented the $connection_time variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2706
diff changeset
3113 connection time in seconds with a milliseconds resolution (1.19.10)
c1d62e514b3c Documented the $connection_time variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2706
diff changeset
3114 </tag-desc>
c1d62e514b3c Documented the $connection_time variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2706
diff changeset
3115
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3116 <tag-name id="var_content_length"><var>$content_length</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3117 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3118 <header>Content-Length</header> request header field
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3119 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3120
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3121 <tag-name id="var_content_type"><var>$content_type</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3122 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3123 <header>Content-Type</header> request header field
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3124 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3125
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3126 <tag-name id="var_cookie_"><var>$cookie_</var><value>name</value></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3127 <tag-desc>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
3128 the <value>name</value> cookie
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3129 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3130
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3131 <tag-name id="var_document_root"><var>$document_root</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3132 <tag-desc>
625
af3f38e349eb Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents: 617
diff changeset
3133 <link id="root"/> or <link id="alias"/> directive’s value
436
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
3134 for the current request
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3135 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3136
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3137 <tag-name id="var_document_uri"><var>$document_uri</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3138 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3139 same as <var>$uri</var>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3140 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3141
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3142 <tag-name id="var_host"><var>$host</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3143 <tag-desc>
940
ded8f4a5de28 Corrected description of the $host variable.
Ruslan Ermilov <ru@nginx.com>
parents: 914
diff changeset
3144 in this order of precedence:
ded8f4a5de28 Corrected description of the $host variable.
Ruslan Ermilov <ru@nginx.com>
parents: 914
diff changeset
3145 host name from the request line, or
ded8f4a5de28 Corrected description of the $host variable.
Ruslan Ermilov <ru@nginx.com>
parents: 914
diff changeset
3146 host name from the <header>Host</header> request header field, or
ded8f4a5de28 Corrected description of the $host variable.
Ruslan Ermilov <ru@nginx.com>
parents: 914
diff changeset
3147 the server name matching a request
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3148 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3149
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3150 <tag-name id="var_hostname"><var>$hostname</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3151 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3152 host name
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3153 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3154
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3155 <tag-name id="var_http_"><var>$http_</var><value>name</value></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3156 <tag-desc>
448
92672f6f0ee1 Elaborated on $http_* and $sent_http_* syntax.
Ruslan Ermilov <ru@nginx.com>
parents: 442
diff changeset
3157 arbitrary request header field;
92672f6f0ee1 Elaborated on $http_* and $sent_http_* syntax.
Ruslan Ermilov <ru@nginx.com>
parents: 442
diff changeset
3158 the last part of a variable name is the field name converted
92672f6f0ee1 Elaborated on $http_* and $sent_http_* syntax.
Ruslan Ermilov <ru@nginx.com>
parents: 442
diff changeset
3159 to lower case with dashes replaced by underscores
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3160 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3161
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3162 <tag-name id="var_https"><var>$https</var></tag-name>
234
ad26f0ae970f Documented the $https variable.
Ruslan Ermilov <ru@nginx.com>
parents: 225
diff changeset
3163 <tag-desc>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
3164 “<literal>on</literal>”
234
ad26f0ae970f Documented the $https variable.
Ruslan Ermilov <ru@nginx.com>
parents: 225
diff changeset
3165 if connection operates in SSL mode,
ad26f0ae970f Documented the $https variable.
Ruslan Ermilov <ru@nginx.com>
parents: 225
diff changeset
3166 or an empty string otherwise
ad26f0ae970f Documented the $https variable.
Ruslan Ermilov <ru@nginx.com>
parents: 225
diff changeset
3167 </tag-desc>
ad26f0ae970f Documented the $https variable.
Ruslan Ermilov <ru@nginx.com>
parents: 225
diff changeset
3168
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3169 <tag-name id="var_is_args"><var>$is_args</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3170 <tag-desc>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
3171 “<literal>?</literal>” if a request line has arguments,
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3172 or an empty string otherwise
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3173 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3174
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3175 <tag-name id="var_limit_rate"><var>$limit_rate</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3176 <tag-desc>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
3177 setting this variable enables response rate limiting;
767
1bb8b733416a Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents: 747
diff changeset
3178 see <link id="limit_rate"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3179 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3180
771
47ad88faaa3f $msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents: 769
diff changeset
3181 <tag-name id="var_msec"><var>$msec</var></tag-name>
47ad88faaa3f $msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents: 769
diff changeset
3182 <tag-desc>
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
3183 current time in seconds with the milliseconds resolution (1.3.9, 1.2.6)
771
47ad88faaa3f $msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents: 769
diff changeset
3184 </tag-desc>
47ad88faaa3f $msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents: 769
diff changeset
3185
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3186 <tag-name id="var_nginx_version"><var>$nginx_version</var></tag-name>
86
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
3187 <tag-desc>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
3188 nginx version
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
3189 </tag-desc>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
3190
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3191 <tag-name id="var_pid"><var>$pid</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3192 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3193 PID of the worker process
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3194 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3195
826
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
3196 <tag-name id="var_pipe"><var>$pipe</var></tag-name>
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
3197 <tag-desc>
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
3198 “<literal>p</literal>” if request was pipelined, “<literal>.</literal>”
840
9dab69f2b71d Documented nginx 1.2.7 changes.
Ruslan Ermilov <ru@nginx.com>
parents: 835
diff changeset
3199 otherwise (1.3.12, 1.2.7)
826
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
3200 </tag-desc>
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
3201
1097
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1037
diff changeset
3202 <tag-name id="var_proxy_protocol_addr"><var>$proxy_protocol_addr</var></tag-name>
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1037
diff changeset
3203 <tag-desc>
2457
3896055c397e Fixed descriptions of $proxy_protocol_addr and $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2452
diff changeset
3204 client address from the PROXY protocol header (1.5.12)
1097
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1037
diff changeset
3205 <para>
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1037
diff changeset
3206 The PROXY protocol must be previously enabled by setting the
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1037
diff changeset
3207 <literal>proxy_protocol</literal> parameter
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1037
diff changeset
3208 in the <link id="listen"/> directive.
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1037
diff changeset
3209 </para>
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1037
diff changeset
3210 </tag-desc>
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1037
diff changeset
3211
1704
792478434bb1 Documented the $proxy_protocol_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1699
diff changeset
3212 <tag-name id="var_proxy_protocol_port"><var>$proxy_protocol_port</var></tag-name>
792478434bb1 Documented the $proxy_protocol_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1699
diff changeset
3213 <tag-desc>
2457
3896055c397e Fixed descriptions of $proxy_protocol_addr and $proxy_protocol_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2452
diff changeset
3214 client port from the PROXY protocol header (1.11.0)
1704
792478434bb1 Documented the $proxy_protocol_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1699
diff changeset
3215 <para>
792478434bb1 Documented the $proxy_protocol_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1699
diff changeset
3216 The PROXY protocol must be previously enabled by setting the
792478434bb1 Documented the $proxy_protocol_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1699
diff changeset
3217 <literal>proxy_protocol</literal> parameter
792478434bb1 Documented the $proxy_protocol_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1699
diff changeset
3218 in the <link id="listen"/> directive.
792478434bb1 Documented the $proxy_protocol_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1699
diff changeset
3219 </para>
792478434bb1 Documented the $proxy_protocol_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1699
diff changeset
3220 </tag-desc>
792478434bb1 Documented the $proxy_protocol_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1699
diff changeset
3221
2458
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
3222 <tag-name id="var_proxy_protocol_server_addr"><var>$proxy_protocol_server_addr</var></tag-name>
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
3223 <tag-desc>
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
3224 server address from the PROXY protocol header (1.17.6)
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
3225 <para>
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
3226 The PROXY protocol must be previously enabled by setting the
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
3227 <literal>proxy_protocol</literal> parameter
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
3228 in the <link id="listen"/> directive.
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
3229 </para>
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
3230 </tag-desc>
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
3231
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
3232 <tag-name id="var_proxy_protocol_server_port"><var>$proxy_protocol_server_port</var></tag-name>
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
3233 <tag-desc>
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
3234 server port from the PROXY protocol header (1.17.6)
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
3235 <para>
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
3236 The PROXY protocol must be previously enabled by setting the
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
3237 <literal>proxy_protocol</literal> parameter
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
3238 in the <link id="listen"/> directive.
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
3239 </para>
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
3240 </tag-desc>
9cd5883ac546 Documented $proxy_protocol_server_addr, $proxy_protocol_server_port.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2457
diff changeset
3241
2903
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3242 <tag-name id="var_proxy_protocol_tlv_"><var>$proxy_protocol_tlv_</var><value>name</value></tag-name>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3243 <tag-desc>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3244 TLV from the PROXY Protocol header (1.23.2).
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3245 The <literal>name</literal> can be a TLV type name or its numeric value.
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3246 In the latter case, the value is hexadecimal
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3247 and should be prefixed with <literal>0x</literal>:
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3248
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3249 <example>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3250 $proxy_protocol_tlv_alpn
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3251 $proxy_protocol_tlv_0x01
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3252 </example>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3253 SSL TLVs can also be accessed by TLV type name
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3254 or its numeric value,
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3255 both prefixed by <literal>ssl_</literal>:
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3256 <example>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3257 $proxy_protocol_tlv_ssl_version
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3258 $proxy_protocol_tlv_ssl_0x21
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3259 </example>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3260
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3261 <para>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3262 The following TLV type names are supported:
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3263 <list type="bullet">
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3264
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3265 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3266 <literal>alpn</literal> (<literal>0x01</literal>)&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3267 upper layer protocol used over the connection
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3268 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3269
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3270 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3271 <literal>authority</literal> (<literal>0x02</literal>)&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3272 host name value passed by the client
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3273 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3274
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3275 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3276 <literal>unique_id</literal> (<literal>0x05</literal>)&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3277 unique connection id
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3278 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3279
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3280 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3281 <literal>netns</literal> (<literal>0x30</literal>)&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3282 name of the namespace
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3283 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3284
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3285 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3286 <literal>ssl</literal> (<literal>0x20</literal>)&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3287 binary SSL TLV structure
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3288 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3289
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3290 </list>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3291 </para>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3292
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3293 <para>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3294 The following SSL TLV type names are supported:
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3295 <list type="bullet">
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3296
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3297 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3298 <literal>ssl_version</literal> (<literal>0x21</literal>)&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3299 SSL version used in client connection
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3300 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3301
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3302 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3303 <literal>ssl_cn</literal> (<literal>0x22</literal>)&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3304 SSL certificate Common Name
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3305 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3306
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3307 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3308 <literal>ssl_cipher</literal> (<literal>0x23</literal>)&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3309 name of the used cipher
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3310 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3311
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3312 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3313 <literal>ssl_sig_alg</literal> (<literal>0x24</literal>)&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3314 algorithm used to sign the certificate
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3315 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3316
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3317 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3318 <literal>ssl_key_alg</literal> (<literal>0x25</literal>)&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3319 public-key algorithm
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3320 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3321
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3322 </list>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3323 </para>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3324
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3325 <para>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3326 Also, the following special SSL TLV type name is supported:
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3327 <list type="bullet">
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3328
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3329 <listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3330 <literal>ssl_verify</literal>&mdash;
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3331 client SSL certificate verification result,
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3332 <literal>0</literal> if the client presented a certificate
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3333 and it was successfully verified,
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3334 non-zero otherwise.
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3335 </listitem>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3336
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3337 </list>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3338 </para>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3339
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3340 <para>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3341 The PROXY protocol must be previously enabled by setting the
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3342 <literal>proxy_protocol</literal> parameter
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3343 in the <link id="listen"/> directive.
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3344 </para>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3345 </tag-desc>
44f3b52c0679 Documented the $proxy_protocol_tlv_ variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2870
diff changeset
3346
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3347 <tag-name id="var_query_string"><var>$query_string</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3348 <tag-desc>
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
3349 same as <var>$args</var>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
3350 </tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
3351
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3352 <tag-name id="var_realpath_root"><var>$realpath_root</var></tag-name>
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
3353 <tag-desc>
436
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
3354 an absolute pathname corresponding to the
625
af3f38e349eb Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents: 617
diff changeset
3355 <link id="root"/> or <link id="alias"/> directive’s value
436
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
3356 for the current request,
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
3357 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
3358 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3359
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3360 <tag-name id="var_remote_addr"><var>$remote_addr</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3361 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3362 client address
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3363 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3364
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3365 <tag-name id="var_remote_port"><var>$remote_port</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3366 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3367 client port
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3368 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3369
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3370 <tag-name id="var_remote_user"><var>$remote_user</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3371 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3372 user name supplied with the Basic authentication
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3373 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3374
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3375 <tag-name id="var_request"><var>$request</var></tag-name>
86
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
3376 <tag-desc>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
3377 full original request line
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
3378 </tag-desc>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
3379
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3380 <tag-name id="var_request_body"><var>$request_body</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3381 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3382 request body
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3383 <para>
625
af3f38e349eb Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents: 617
diff changeset
3384 The variable’s value is made available in locations
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3385 processed by the
1181
b8f0362f61e5 Added links to scgi.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1151
diff changeset
3386 <link doc="ngx_http_proxy_module.xml" id="proxy_pass"/>,
b8f0362f61e5 Added links to scgi.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1151
diff changeset
3387 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass"/>,
1194
9264fdb6c833 Added links to uwsgi.
Ruslan Ermilov <ru@nginx.com>
parents: 1181
diff changeset
3388 <link doc="ngx_http_uwsgi_module.xml" id="uwsgi_pass"/>,
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3389 and
1181
b8f0362f61e5 Added links to scgi.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1151
diff changeset
3390 <link doc="ngx_http_scgi_module.xml" id="scgi_pass"/>
1732
5eb54b170c74 Clarified cases when $request_body is not empty.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1721
diff changeset
3391 directives when the request body was read to
5eb54b170c74 Clarified cases when $request_body is not empty.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1721
diff changeset
3392 a <link id="client_body_buffer_size">memory buffer</link>.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3393 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3394 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3395
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3396 <tag-name id="var_request_body_file"><var>$request_body_file</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3397 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3398 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
3399 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3400 At the end of processing, the file needs to be removed.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
3401 To always write the request body to a file,
406
98dac2bd7598 Links with mixed underscores and spaces were hard to read, eliminated them.
Ruslan Ermilov <ru@nginx.com>
parents: 400
diff changeset
3402 <link id="client_body_in_file_only"/> needs to be enabled.
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
3403 When the name of a temporary file is passed in a proxied request
1194
9264fdb6c833 Added links to uwsgi.
Ruslan Ermilov <ru@nginx.com>
parents: 1181
diff changeset
3404 or in a request to a FastCGI/uwsgi/SCGI server,
958
fd1f8e0a405e Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 941
diff changeset
3405 passing the request body should be disabled by the
246
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
3406 <link doc="ngx_http_proxy_module.xml" id="proxy_pass_request_body">
1181
b8f0362f61e5 Added links to scgi.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1151
diff changeset
3407 proxy_pass_request_body off</link>,
246
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
3408 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass_request_body">
1194
9264fdb6c833 Added links to uwsgi.
Ruslan Ermilov <ru@nginx.com>
parents: 1181
diff changeset
3409 fastcgi_pass_request_body off</link>,
9264fdb6c833 Added links to uwsgi.
Ruslan Ermilov <ru@nginx.com>
parents: 1181
diff changeset
3410 <link doc="ngx_http_uwsgi_module.xml" id="uwsgi_pass_request_body">
9264fdb6c833 Added links to uwsgi.
Ruslan Ermilov <ru@nginx.com>
parents: 1181
diff changeset
3411 uwsgi_pass_request_body off</link>, or
1181
b8f0362f61e5 Added links to scgi.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1151
diff changeset
3412 <link doc="ngx_http_scgi_module.xml" id="scgi_pass_request_body">
b8f0362f61e5 Added links to scgi.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1151
diff changeset
3413 scgi_pass_request_body off</link>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3414 directives, respectively.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3415 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3416 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3417
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3418 <tag-name id="var_request_completion"><var>$request_completion</var></tag-name>
88
6876e2558d09 Spell checking.
Ruslan Ermilov <ru@nginx.com>
parents: 86
diff changeset
3419 <tag-desc>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
3420 “<literal>OK</literal>” if a request has completed,
88
6876e2558d09 Spell checking.
Ruslan Ermilov <ru@nginx.com>
parents: 86
diff changeset
3421 or an empty string otherwise
6876e2558d09 Spell checking.
Ruslan Ermilov <ru@nginx.com>
parents: 86
diff changeset
3422 </tag-desc>
6876e2558d09 Spell checking.
Ruslan Ermilov <ru@nginx.com>
parents: 86
diff changeset
3423
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3424 <tag-name id="var_request_filename"><var>$request_filename</var></tag-name>
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
3425 <tag-desc>
530
d8c7160527ae query -> request
Ruslan Ermilov <ru@nginx.com>
parents: 527
diff changeset
3426 file path for the current request, based on the
246
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
3427 <link id="root"/> or <link id="alias"/>
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
3428 directives, and the request URI
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
3429 </tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
3430
1692
4319f72f11f5 Documented the $request_id variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1680
diff changeset
3431 <tag-name id="var_request_id"><var>$request_id</var></tag-name>
4319f72f11f5 Documented the $request_id variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1680
diff changeset
3432 <tag-desc>
1721
737c86e8b316 Clarified meaning of the $request_id variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1704
diff changeset
3433 unique request identifier
737c86e8b316 Clarified meaning of the $request_id variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1704
diff changeset
3434 generated from 16 random bytes, in hexadecimal (1.11.0)
1692
4319f72f11f5 Documented the $request_id variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1680
diff changeset
3435 </tag-desc>
4319f72f11f5 Documented the $request_id variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1680
diff changeset
3436
826
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
3437 <tag-name id="var_request_length"><var>$request_length</var></tag-name>
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
3438 <tag-desc>
840
9dab69f2b71d Documented nginx 1.2.7 changes.
Ruslan Ermilov <ru@nginx.com>
parents: 835
diff changeset
3439 request length (including request line, header, and request body)
9dab69f2b71d Documented nginx 1.2.7 changes.
Ruslan Ermilov <ru@nginx.com>
parents: 835
diff changeset
3440 (1.3.12, 1.2.7)
826
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
3441 </tag-desc>
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
3442
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3443 <tag-name id="var_request_method"><var>$request_method</var></tag-name>
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
3444 <tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
3445 request method, usually
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
3446 “<literal>GET</literal>” or “<literal>POST</literal>”
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
3447 </tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
3448
771
47ad88faaa3f $msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents: 769
diff changeset
3449 <tag-name id="var_request_time"><var>$request_time</var></tag-name>
47ad88faaa3f $msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents: 769
diff changeset
3450 <tag-desc>
779
32b8498cfb40 $msec and $request_time have become generic variables in 1.2.6.
Ruslan Ermilov <ru@nginx.com>
parents: 771
diff changeset
3451 request processing time in seconds with a milliseconds resolution
32b8498cfb40 $msec and $request_time have become generic variables in 1.2.6.
Ruslan Ermilov <ru@nginx.com>
parents: 771
diff changeset
3452 (1.3.9, 1.2.6);
771
47ad88faaa3f $msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents: 769
diff changeset
3453 time elapsed since the first bytes were read from the client
47ad88faaa3f $msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents: 769
diff changeset
3454 </tag-desc>
47ad88faaa3f $msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents: 769
diff changeset
3455
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3456 <tag-name id="var_request_uri"><var>$request_uri</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3457 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3458 full original request URI (with arguments)
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3459 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3460
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3461 <tag-name id="var_scheme"><var>$scheme</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3462 <tag-desc>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
3463 request scheme, “<literal>http</literal>” or “<literal>https</literal>”
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3464 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3465
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3466 <tag-name id="var_sent_http_"><var>$sent_http_</var><value>name</value></tag-name>
86
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
3467 <tag-desc>
448
92672f6f0ee1 Elaborated on $http_* and $sent_http_* syntax.
Ruslan Ermilov <ru@nginx.com>
parents: 442
diff changeset
3468 arbitrary response header field;
92672f6f0ee1 Elaborated on $http_* and $sent_http_* syntax.
Ruslan Ermilov <ru@nginx.com>
parents: 442
diff changeset
3469 the last part of a variable name is the field name converted
92672f6f0ee1 Elaborated on $http_* and $sent_http_* syntax.
Ruslan Ermilov <ru@nginx.com>
parents: 442
diff changeset
3470 to lower case with dashes replaced by underscores
86
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
3471 </tag-desc>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
3472
2003
be779702663e Documented the "sent_trailer_" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1964
diff changeset
3473 <tag-name id="var_sent_trailer_"><var>$sent_trailer_</var><value>name</value></tag-name>
be779702663e Documented the "sent_trailer_" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1964
diff changeset
3474 <tag-desc>
be779702663e Documented the "sent_trailer_" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1964
diff changeset
3475 arbitrary field sent at the end of the response (1.13.2);
be779702663e Documented the "sent_trailer_" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1964
diff changeset
3476 the last part of a variable name is the field name converted
be779702663e Documented the "sent_trailer_" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1964
diff changeset
3477 to lower case with dashes replaced by underscores
be779702663e Documented the "sent_trailer_" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1964
diff changeset
3478 </tag-desc>
be779702663e Documented the "sent_trailer_" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1964
diff changeset
3479
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3480 <tag-name id="var_server_addr"><var>$server_addr</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3481 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3482 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
3483 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3484 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
3485 To avoid a system call, the <link id="listen"/> directives
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
3486 must specify addresses and use the <literal>bind</literal> parameter.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3487 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3488 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3489
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3490 <tag-name id="var_server_name"><var>$server_name</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3491 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3492 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
3493 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3494
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3495 <tag-name id="var_server_port"><var>$server_port</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3496 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3497 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
3498 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3499
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3500 <tag-name id="var_server_protocol"><var>$server_protocol</var></tag-name>
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
3501 <tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
3502 request protocol, usually
1597
8b97ba73129b Added HTTP/2.0 to the "server_protocol" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1576
diff changeset
3503 “<literal>HTTP/1.0</literal>”,
1614
1bab8e5f53c6 Added Oxford comma to "$server_protocol".
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1597
diff changeset
3504 “<literal>HTTP/1.1</literal>”,
2956
a85e4d126bc7 Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2922
diff changeset
3505 “<link doc="ngx_http_v2_module.xml">HTTP/2.0</link>”,
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
3506 or
2956
a85e4d126bc7 Updated docs for the upcoming NGINX Plus release.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2922
diff changeset
3507 “<link doc="ngx_http_v3_module.xml">HTTP/3.0</link>”
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
3508 </tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
3509
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3510 <tag-name id="var_status"><var>$status</var></tag-name>
541
a8971cf346be Documented the $status core variable.
Andrey Belov <defan@nginx.com>
parents: 537
diff changeset
3511 <tag-desc>
769
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
3512 response status (1.3.2, 1.2.2)
541
a8971cf346be Documented the $status core variable.
Andrey Belov <defan@nginx.com>
parents: 537
diff changeset
3513 </tag-desc>
a8971cf346be Documented the $status core variable.
Andrey Belov <defan@nginx.com>
parents: 537
diff changeset
3514
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3515 <tag-name id="var_tcpinfo_">
453
98ee97a382d3 Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents: 448
diff changeset
3516 <var>$tcpinfo_rtt</var>,
98ee97a382d3 Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents: 448
diff changeset
3517 <var>$tcpinfo_rttvar</var>,
98ee97a382d3 Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents: 448
diff changeset
3518 <var>$tcpinfo_snd_cwnd</var>,
98ee97a382d3 Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents: 448
diff changeset
3519 <var>$tcpinfo_rcv_space</var>
98ee97a382d3 Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents: 448
diff changeset
3520 </tag-name>
98ee97a382d3 Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents: 448
diff changeset
3521 <tag-desc>
98ee97a382d3 Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents: 448
diff changeset
3522 information about the client TCP connection; available on systems
98ee97a382d3 Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents: 448
diff changeset
3523 that support the <c-def>TCP_INFO</c-def> socket option
98ee97a382d3 Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents: 448
diff changeset
3524 </tag-desc>
98ee97a382d3 Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents: 448
diff changeset
3525
826
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
3526 <tag-name id="var_time_iso8601"><var>$time_iso8601</var></tag-name>
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
3527 <tag-desc>
840
9dab69f2b71d Documented nginx 1.2.7 changes.
Ruslan Ermilov <ru@nginx.com>
parents: 835
diff changeset
3528 local time in the ISO 8601 standard format (1.3.12, 1.2.7)
826
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
3529 </tag-desc>
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
3530
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
3531 <tag-name id="var_time_local"><var>$time_local</var></tag-name>
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
3532 <tag-desc>
840
9dab69f2b71d Documented nginx 1.2.7 changes.
Ruslan Ermilov <ru@nginx.com>
parents: 835
diff changeset
3533 local time in the Common Log Format (1.3.12, 1.2.7)
826
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
3534 </tag-desc>
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
3535
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3536 <tag-name id="var_uri"><var>$uri</var></tag-name>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3537 <tag-desc>
503
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
3538 current URI in request, <link id="location">normalized</link>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3539 <para>
503
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
3540 The value of <var>$uri</var> may change during request processing,
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
3541 e.g. when doing internal redirects, or when using index files.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3542 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3543 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3544
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3545 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3546 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3547
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3548 </section>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3549
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3550 </module>