annotate xml/en/docs/http/ngx_http_core_module.xml @ 941:7d1d53d4d293

Removed link-scoped IPv6 addresses from examples.
author Ruslan Ermilov <ru@nginx.com>
date Fri, 05 Jul 2013 08:11:37 +0400
parents ded8f4a5de28
children fd1f8e0a405e
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"
941
7d1d53d4d293 Removed link-scoped IPv6 addresses from examples.
Ruslan Ermilov <ru@nginx.com>
parents: 940
diff changeset
13 rev="22">
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
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
17 <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
18 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
19 <literal>on</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
20 <literal>off</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
21 <literal>sendfile</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
22 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
23 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
24 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
25 <context>location</context>
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
26 <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
27
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
28 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
29 Enables or disables the use of asynchronous file I/O (AIO)
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
30 on FreeBSD and Linux.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
31 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
32
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
33 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
34 On FreeBSD, AIO is usable starting from FreeBSD&nbsp;4.3.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
35 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
36 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
37 options VFS_AIO
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
38 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
39 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
40 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
41 kldload aio
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
42 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
43 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
44
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
45 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
46 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
47 when booting the kernel, will cause the entire networking subsystem
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
48 to use the Giant lock that can impact overall performance negatively.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
49 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
50 FreeBSD&nbsp;7.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
51 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
52 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
53 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
54 after the kernel has booted.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
55 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
56 <path>/var/log/messages</path>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
57 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
58 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
59 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
60 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
61 and can safely be ignored.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
62 <note>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
63 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
64 fact that FreeBSD supports asynchronous calls
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
65 <c-func>aio_read</c-func>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
66 and
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
67 <c-func>aio_write</c-func>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
68 when working with sockets.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
69 However, since nginx only uses AIO for disk I/O, no problems should arise.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
70 </note>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
71 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
72
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 For AIO to work,
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
75 <link id="sendfile"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
76 needs to be disabled:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
77 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
78 location /video/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
79 sendfile off;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
80 aio on;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
81 output_buffers 1 64k;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
82 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
83 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
84 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
85
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
86 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
87 In addition, starting from FreeBSD&nbsp;5.2.1 and nginx&nbsp;0.8.12, AIO can
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
88 also be used to pre-load data for <c-func>sendfile</c-func>:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
89 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
90 location /video/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
91 sendfile on;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
92 tcp_nopush on;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
93 aio sendfile;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
94 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
95 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
96 In this configuration, <c-func>sendfile</c-func> is called with
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
97 the <c-def>SF_NODISKIO</c-def> flag which causes it not to
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
98 block on disk I/O and instead report back when the data are not in
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
99 memory; nginx then initiates an asynchronous data load by reading
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
100 one byte.
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
101 The FreeBSD kernel then loads the first 128K bytes
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
102 of a file into memory, however next reads will only load data
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
103 in 16K chunks.
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
104 This can be tuned using the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
105 <link id="read_ahead"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
106 directive.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
107 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
108
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
109 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
110 On Linux, AIO is usable starting from kernel version 2.6.22;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
111 plus, it is also necessary to enable
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
112 <link id="directio"/>,
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
113 otherwise reading will be blocking:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
114 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
115 location /video/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
116 aio on;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
117 directio 512;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
118 output_buffers 1 128k;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
119 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
120 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
121 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
122
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
123 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
124 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
125 <link id="directio"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
126 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
127 boundaries (or 4K for XFS).
625
af3f38e349eb Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents: 617
diff changeset
128 Reading of unaligned file’s end is still made in blocking mode.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
129 The same holds true for byte range requests, and for FLV requests
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
130 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
131 beginning and end of a file will be blocking.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
132 There is no need to turn off
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
133 <link id="sendfile"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
134 explicitly as it is turned off automatically when
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
135 <link id="directio"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
136 is used.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
137 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
138
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
139 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
140
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
141
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
142 <directive name="alias">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
143 <syntax><value>path</value></syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
144 <default/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
145 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
146
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
147 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
148 Defines a replacement for the specified location.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
149 For example, with the following configuration
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
150 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
151 location /i/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
152 alias /data/w3/images/;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
153 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
154 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
155 the request of
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
156 “<literal>/i/top.gif</literal>” will be responded
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
157 with the file
148
682163f2b298 Unified article/path and module/pathname into a single "path".
Ruslan Ermilov <ru@nginx.com>
parents: 147
diff changeset
158 <path>/data/w3/images/top.gif</path>.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
159 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
160
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
161 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
162 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
163 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
164 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
165
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
166 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
167 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
168 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
169 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
170 these captures (0.7.40), for example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
171 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
172 location ~ ^/users/(.+\.(?:gif|jpe?g|png))$ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
173 alias /data/w3/images/$1;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
174 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
175 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
176 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
177
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
178 <para>
625
af3f38e349eb Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents: 617
diff changeset
179 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
180 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
181 location /images/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
182 alias /data/w3/images/;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
183 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
184 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
185 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
186 <link id="root"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
187 directive instead:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
188 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
189 location /images/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
190 root /data/w3;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
191 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
192 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
193 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
194
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
195 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
196
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
197
162
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
198 <directive name="chunked_transfer_encoding">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
199 <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
200 <default>on</default>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
201 <context>http</context>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
202 <context>server</context>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
203 <context>location</context>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
204
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
205 <para>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
206 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
207 It may come in handy when using a software failing to support
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
208 chunked encoding though the standard requires it.
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
209 </para>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
210
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
211 </directive>
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
212
a8bd350e3481 Documented the "chunked_transfer_encoding" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 161
diff changeset
213
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
214 <directive name="client_body_buffer_size">
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
215
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
216 <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
217 <default>8k|16k</default>
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
218 <context>http</context>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
219 <context>server</context>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
220 <context>location</context>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
221
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
222 <para>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
223 Sets buffer size for reading client request body.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
224 In case request body is larger than the buffer,
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
225 the whole body or only its part is written to a
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
226 <link id="client_body_temp_path">temporary file</link>.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
227 By default, buffer size is equal to two memory pages.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
228 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
229 It is usually 16K on other 64-bit platforms.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
230 </para>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
231
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
232 </directive>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
233
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
234
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
235 <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
236 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
237 <literal>on</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
238 <literal>clean</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
239 <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
240 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
241 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
242 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
243 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
244
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
245 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
246 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
247 into a file.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
248 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
249 <var>$request_body_file</var>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
250 variable, or the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
251 <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
252 method of the module
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
253 <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
254 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
255
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
256 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
257 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
258 removed after request processing.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
259 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
260
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
261 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
262 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
263 left after request processing to be removed.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
264 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
265
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
266 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
267
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
268
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
269 <directive name="client_body_in_single_buffer">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
270 <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
271 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
272 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
273 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
274 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
275
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
276 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
277 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
278 in a single buffer.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
279 The directive is recommended when using the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
280 <var>$request_body</var>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
281 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
282 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
283
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
284 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
285
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
286
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
287 <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
288 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
289 <value>path</value>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
290 [<value>level1</value>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
291 [<value>level2</value>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
292 [<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
293 <default>client_body_temp</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
294 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
295 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
296 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
297
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
298 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
299 Defines a directory for storing temporary files holding client request bodies.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
300 Up to three-level subdirectory hierarchy can be used underneath the specified
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
301 directory.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
302 For example, in the following configuration
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
303 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
304 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
305 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
306 a temporary file might look like this:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
307 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
308 /spool/nginx/client_temp/7/45/00000123457
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
309 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
310 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
311
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
312 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
313
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
314
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
315 <directive name="client_body_timeout">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
316 <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
317 <default>60s</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
318 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
319 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
320 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
321
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
322 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
323 Defines a timeout for reading client request body.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
324 A timeout is only set between two successive read operations,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
325 not for the transmission of the whole request body.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
326 If a client does not transmit anything within this time,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
327 the client error
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
328 <http-status code="408" text="Request Time-out"/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
329 is returned.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
330 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
331
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
332 </directive>
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
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
335 <directive name="client_header_buffer_size">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
336 <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
337 <default>1k</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
338 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
339 <context>server</context>
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 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
342 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
343 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
344 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
345 it may not fit into 1K.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
346 If a request line, or a request header field do not fit entirely into
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
347 this buffer then larger buffers are allocated, configured by the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
348 <link id="large_client_header_buffers"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
349 directive.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
350 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
351
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
352 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
353
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
354
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
355 <directive name="client_header_timeout">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
356 <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
357 <default>60s</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
358 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
359 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
360
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
361 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
362 Defines a timeout for reading client request header.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
363 If a client does not transmit the entire header within this time,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
364 the client error
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
365 <http-status code="408" text="Request Time-out"/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
366 is returned.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
367 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
368
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
369 </directive>
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
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
372 <directive name="client_max_body_size">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
373 <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
374 <default>1m</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
375 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
376 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
377 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
378
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
379 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
380 Sets the maximum allowed size of the client request body,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
381 specified in the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
382 <header>Content-Length</header>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
383 request header field.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
384 If it exceeds the configured value, the client error
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
385 <http-status code="413" text="Request Entity Too Large"/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
386 is returned.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
387 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
388 <!--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
389 this error<!--/link-->.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
390 Setting <value>size</value> to 0 disables client
65
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
391 request body size checking.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
392 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
393
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
394 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
395
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
396
161
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
397 <directive name="connection_pool_size">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
398 <syntax><value>size</value></syntax>
161
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
399 <default>256</default>
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
400 <context>http</context>
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
401 <context>server</context>
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
402
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
403 <para>
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
404 Allows to fine tune per-connection memory allocations.
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
405 This directive has minimal impact on performance,
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
406 and should not generally be used.
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
407 </para>
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
408
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
409 </directive>
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
410
ec980064d576 Documented the "connection_pool_size" and "request_pool_size" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 160
diff changeset
411
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
412 <directive name="default_type">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
413 <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
414 <default>text/plain</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
415 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
416 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
417 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
418
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
419 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
420 Defines a default MIME-type of a response.
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
421 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
422 with the <link id="types"/> directive.
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
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
425 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
426
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
427
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
428 <directive name="directio">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
429 <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
430 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
431 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
432 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
433 <context>location</context>
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
434 <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
435
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
436 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
437 Enables the use of
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
438 the <c-def>O_DIRECT</c-def> flag (FreeBSD, Linux),
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
439 the <c-def>F_NOCACHE</c-def> flag (Mac OS X),
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
440 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
441 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
442 the specified <value>size</value>.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
443 It automatically disables (0.7.15) the use of
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
444 <link id="sendfile"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
445 for a given request.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
446 It could be useful for serving large files:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
447 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
448 directio 4m;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
449 </example>
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
450 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
451 </para>
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>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
454
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
455
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
456 <directive name="directio_alignment">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
457 <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
458 <default>512</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
459 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
460 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
461 <context>location</context>
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
462 <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
463
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
464 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
465 Sets an alignment for
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
466 <link id="directio"/>.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
467 In most cases, a 512-byte alignment is enough, however, when
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
468 using XFS under Linux, it needs to be increased to 4K.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
469 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
470
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
471 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
472
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
473
418
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
474 <directive name="disable_symlinks">
436
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
475 <syntax><literal>off</literal></syntax>
418
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
476 <syntax>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
477 <literal>on</literal> |
436
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
478 <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
479 [<literal>from</literal>=<value>part</value>]</syntax>
418
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
480 <default>off</default>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
481 <context>http</context>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
482 <context>server</context>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
483 <context>location</context>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
484 <appeared-in>1.1.15</appeared-in>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
485
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
486 <para>
436
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
487 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
488 <list type="tag">
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
489
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
490 <tag-name><literal>off</literal></tag-name>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
491 <tag-desc>
436
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
492 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
493 This is the default behavior.
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
494 </tag-desc>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
495
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
496 <tag-name><literal>on</literal></tag-name>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
497 <tag-desc>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
498 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
499 access to a file is denied.
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
500 </tag-desc>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
501
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
502 <tag-name><literal>if_not_owner</literal></tag-name>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
503 <tag-desc>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
504 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
505 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
506 points to have different owners.
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
507 </tag-desc>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
508
438
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
509 <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
510 <tag-desc>
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
511 When checking symbolic links
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
512 (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
513 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
514 Checking of symbolic links in the initial part of the pathname
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
515 may be avoided by also specifying the
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
516 <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
517 In this case, symbolic links are checked only from
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
518 the component of the pathname following the specified initial part.
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
519 If a value is not an initial part of the checked pathname, the whole
436
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
520 pathname is checked as if this parameter was not specified at all.
438
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
521 If a value fully matches the file name,
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
522 symbolic links are not checked.
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
523 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
524 </tag-desc>
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
525
418
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
526 </list>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
527 </para>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
528
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
529 <para>
436
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
530 Example:
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
531 <example>
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
532 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
533 </example>
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
534 </para>
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
535
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
536 <para>
418
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
537 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
538 <c-func>openat</c-func> and <c-func>fstatat</c-func> interfaces.
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
539 This includes modern versions of FreeBSD, Linux, and Solaris.
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
540 </para>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
541
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
542 <para>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
543 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
544 add a processing overhead.
436
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
545 <note>
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
546 On systems that do not support opening directories for search only,
438
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
547 the use of these parameters requires that worker processes
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
548 have read permissions for all checked directories.
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
549 </note>
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
550 </para>
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
551
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
552 <para>
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
553 <note>
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
554 The
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
555 <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
556 <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
557 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
558 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
559 </note>
418
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
560 </para>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
561
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
562 </directive>
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
563
2638f67205ee Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents: 406
diff changeset
564
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
565 <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
566 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
567 <value>code</value> ...
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
568 [<literal>=</literal>[<value>response</value>]]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
569 <value>uri</value></syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
570 <default/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
571 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
572 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
573 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
574 <context>if in location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
575
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
576 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
577 Defines the URI that will be shown for the specified errors.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
578 These directives are inherited from the previous level if and
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
579 only if there are no
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
580 <literal>error_page</literal>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
581 directives on
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
582 the current level.
679
9888364847b7 Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents: 674
diff changeset
583 A <literal>uri</literal> value can contain variables.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
584 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
585
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
586 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
587 Example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
588 <example>
711
1f383a8bccdb Minor improvements over the recent additions to the "error_page" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 709
diff changeset
589 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
590 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
591 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
592 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
593
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
594 <para>
679
9888364847b7 Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents: 674
diff changeset
595 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
596 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
597 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
598 error_page 404 =200 /empty.gif;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
599 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
600 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
601
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
602 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
603 If an error response is processed by a proxied server, or a FastCGI server,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
604 and the server may return different response codes (e.g., 200, 302, 401
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
605 or 404), it is possible to respond with a returned code:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
606 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
607 error_page 404 = /404.php;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
608 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
609 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
610
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
611 <para>
679
9888364847b7 Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents: 674
diff changeset
612 It is also possible to use redirects for error processing:
9888364847b7 Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents: 674
diff changeset
613 <example>
711
1f383a8bccdb Minor improvements over the recent additions to the "error_page" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 709
diff changeset
614 error_page 403 http://example.com/forbidden.html;
1f383a8bccdb Minor improvements over the recent additions to the "error_page" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 709
diff changeset
615 error_page 404 =301 http://example.com/notfound.html;
679
9888364847b7 Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents: 674
diff changeset
616 </example>
871
96839d165b8a Clarify the description of error_page example.
Sergey Kandaurov <pluknet@nginx.com>
parents: 869
diff changeset
617 In this case, by default, the response code 302 is returned to the client.
679
9888364847b7 Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents: 674
diff changeset
618 It can only be changed to one of the redirect status
711
1f383a8bccdb Minor improvements over the recent additions to the "error_page" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 709
diff changeset
619 codes (301, 302, 303, and 307).
679
9888364847b7 Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents: 674
diff changeset
620 </para>
9888364847b7 Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents: 674
diff changeset
621
9888364847b7 Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents: 674
diff changeset
622 <para>
9888364847b7 Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents: 674
diff changeset
623 If there is no need to change URI during internal redirection it is
9888364847b7 Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents: 674
diff changeset
624 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
625 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
626 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
627 error_page 404 = @fallback;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
628 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
629
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
630 location @fallback {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
631 proxy_pass http://backend;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
632 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
633 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
634 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
635
679
9888364847b7 Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents: 674
diff changeset
636 <para>
9888364847b7 Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents: 674
diff changeset
637 <note>
711
1f383a8bccdb Minor improvements over the recent additions to the "error_page" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 709
diff changeset
638 If <literal>uri</literal> processing leads to an error,
747
ddec437b692b Fixed a number of typos.
Vladimir Homutov <vl@nginx.com>
parents: 741
diff changeset
639 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
640 </note>
9888364847b7 Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents: 674
diff changeset
641 </para>
9888364847b7 Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents: 674
diff changeset
642
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
643 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
644
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
645
576
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
646 <directive name="etag">
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
647 <syntax><literal>on</literal> | <literal>off</literal></syntax>
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
648 <default>on</default>
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
649 <context>http</context>
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
650 <context>server</context>
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
651 <context>location</context>
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
652 <appeared-in>1.3.3</appeared-in>
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
653
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
654 <para>
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
655 Enables or disables automatic generation of the <header>ETag</header>
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
656 response header field for static resources.
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
657 </para>
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
658
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
659 </directive>
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
660
cac22cc79afd Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 566
diff changeset
661
651
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
662 <directive name="http">
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
663 <syntax block="yes"/>
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
664 <default/>
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
665 <context>main</context>
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
666
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
667 <para>
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
668 Provides a configuration file context in which the HTTP server directives
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
669 are specified.
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
670 </para>
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
671
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
672 </directive>
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
673
eba81bfb6aaf Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents: 628
diff changeset
674
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
675 <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
676 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
677 <literal>off</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
678 <literal>exact</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
679 <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
680 <default>exact</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
681 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
682 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
683 <context>location</context>
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
684 <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
685
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
686 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
687 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
688 with the time in the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
689 <header>If-Modified-Since</header>
235
6d8356490215 Consistently call header fields as such.
Ruslan Ermilov <ru@nginx.com>
parents: 234
diff changeset
690 request header field:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
691
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
692 <list type="tag">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
693
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
694 <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
695 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
696 the
235
6d8356490215 Consistently call header fields as such.
Ruslan Ermilov <ru@nginx.com>
parents: 234
diff changeset
697 <header>If-Modified-Since</header> request header field is ignored (0.7.34);
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
698 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
699
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
700 <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
701 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
702 exact match;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
703 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
704
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
705 <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
706 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
707 modification time of a response is
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
708 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
709 request header field.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
710 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
711
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
712 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
713 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
714
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
715 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
716
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
717
152
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
718 <directive name="ignore_invalid_headers">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
719 <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
720 <default>on</default>
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
721 <context>http</context>
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
722 <context>server</context>
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
723
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
724 <para>
235
6d8356490215 Consistently call header fields as such.
Ruslan Ermilov <ru@nginx.com>
parents: 234
diff changeset
725 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
726 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
727 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
728 directive).
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
729 </para>
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
730
426
1d6dc85ed324 Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents: 419
diff changeset
731 <para>
1d6dc85ed324 Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents: 419
diff changeset
732 A directive can be specified on the <link id="server"/> level
1d6dc85ed324 Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents: 419
diff changeset
733 in a default server.
1d6dc85ed324 Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents: 419
diff changeset
734 In this case, its value will cover all virtual servers
1d6dc85ed324 Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents: 419
diff changeset
735 listening on the same address and port.
1d6dc85ed324 Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents: 419
diff changeset
736 </para>
1d6dc85ed324 Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents: 419
diff changeset
737
152
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
738 </directive>
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
739
5a35535f7cdf Documented the "ignore_invalid_headers" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 148
diff changeset
740
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
741 <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
742 <syntax/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
743 <default/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
744 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
745
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
746 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
747 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
748 For external requests, the client error
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
749 <http-status code="404" text="Not Found"/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
750 is returned.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
751 Internal requests are the following:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
752
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
753 <list type="bullet">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
754
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
755 <listitem>
429
2b9507b2cdf3 List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents: 426
diff changeset
756 requests redirected by the
2b9507b2cdf3 List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents: 426
diff changeset
757 <link id="error_page"/>,
2b9507b2cdf3 List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents: 426
diff changeset
758 <link doc="ngx_http_index_module.xml" id="index"/>,
2b9507b2cdf3 List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents: 426
diff changeset
759 <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
760 <link id="try_files"/> directives;
2b9507b2cdf3 List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents: 426
diff changeset
761 </listitem>
2b9507b2cdf3 List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents: 426
diff changeset
762
2b9507b2cdf3 List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents: 426
diff changeset
763 <listitem>
2b9507b2cdf3 List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents: 426
diff changeset
764 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
765 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
766 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
767
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
768 <listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
769 subrequests formed by the
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
770 “<command>include virtual</command>”
438
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
771 command of the
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
772 <link doc="ngx_http_ssi_module.xml">ngx_http_ssi_module</link>
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
773 module and by the
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
774 <link doc="ngx_http_addition_module.xml">ngx_http_addition_module</link>
b27974b92a58 - corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents: 436
diff changeset
775 module directives;
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
776 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
777
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
778 <listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
779 requests changed by the
429
2b9507b2cdf3 List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents: 426
diff changeset
780 <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
781 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
782
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
783 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
784 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
785
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
786 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
787 Example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
788 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
789 error_page 404 /404.html;
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 location /404.html {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
792 internal;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
793 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
794 </example>
674
c48c0936b4df Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
795 <note>
c48c0936b4df Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
796 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
797 request processing cycles that can occur in incorrect configurations.
c48c0936b4df Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
798 If this limit is reached, the error
c48c0936b4df Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
799 <http-status code="500" text="Internal Server Error"/> is returned.
c48c0936b4df Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
800 In such cases, the “rewrite or internal redirection cycle” message
c48c0936b4df Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
801 can be seen in the error log.
c48c0936b4df Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
802 </note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
803 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
804
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
805 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
806
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
807
176
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
808 <directive name="keepalive_disable">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
809 <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
810 <default>msie6</default>
176
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
811 <context>http</context>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
812 <context>server</context>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
813 <context>location</context>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
814
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
815 <para>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
816 Disables keep-alive connections with misbehaving browsers.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
817 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
818 browsers will be affected.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
819 The value <literal>msie6</literal> disables keep-alive connections
252
6f710464be38 Applied nitpicking by Maxim Dounin, translated into English.
Ruslan Ermilov <ru@nginx.com>
parents: 246
diff changeset
820 with old versions of MSIE, after seeing a POST request.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
821 The value <literal>safari</literal> disables keep-alive connections
467
c505c92c8658 Documented recent changes to the "keepalive_disable" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 454
diff changeset
822 with Safari and Safari-like browsers on Mac OS X and Mac OS X-like
c505c92c8658 Documented recent changes to the "keepalive_disable" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 454
diff changeset
823 operating systems.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
824 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
825 with all browsers.
467
c505c92c8658 Documented recent changes to the "keepalive_disable" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 454
diff changeset
826 <note>
c505c92c8658 Documented recent changes to the "keepalive_disable" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 454
diff changeset
827 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
828 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
829 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
830 </note>
176
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
831 </para>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
832
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
833 </directive>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
834
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
835
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
836 <directive name="keepalive_requests">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
837 <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
838 <default>100</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
839 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
840 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
841 <context>location</context>
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
842 <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
843
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
844 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
845 Sets the maximum number of requests that can be
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
846 made through one keep-alive connection.
65
f122a777a6de - Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
847 After this many requests are made, the connection is closed.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
848 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
849
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
850 </directive>
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
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
853 <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
854 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
855 <value>timeout</value>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
856 [<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
857 <default>75s</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
858 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
859 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
860 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
861
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
862 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
863 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
864 client connection will stay open on the server side.
835
e0263d44a59b Http core: documented "keepalive_timeout 0".
Ruslan Ermilov <ru@nginx.com>
parents: 826
diff changeset
865 The value of zero disables keep-alive client connections.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
866 The optional second parameter sets a value in the
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
867 <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
868 response header field.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
869 Two parameters may differ.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
870 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
871
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
872 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
873 The
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
874 <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
875 header field is understood by Mozilla and Konqueror.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
876 MSIE will close keep-alive connection in about 60 seconds.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
877 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
878
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
879 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
880
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
881
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
882 <directive name="large_client_header_buffers">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
883 <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
884 <default>4 8k</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
885 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
886 <context>server</context>
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>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
889 Sets the maximum <value>number</value> and <value>size</value> of
235
6d8356490215 Consistently call header fields as such.
Ruslan Ermilov <ru@nginx.com>
parents: 234
diff changeset
890 buffers used when reading large client request header.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
891 A request line cannot exceed the size of one buffer, or the client error
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
892 <http-status code="414" text="Request-URI Too Large"/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
893 is returned.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
894 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
895 client error
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
896 <http-status code="400" text="Bad Request"/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
897 is returned.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
898 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
899 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
900 If after the end of request processing a connection is transitioned
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
901 into the keep-alive state, these buffers are freed.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
902 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
903
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
904 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
905
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 name="limit_except">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
908 <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
909 <default/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
910 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
911
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
912 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
913 Limits allowed HTTP methods inside a location.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
914 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
915 <literal>GET</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
916 <literal>HEAD</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
917 <literal>POST</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
918 <literal>PUT</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
919 <literal>DELETE</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
920 <literal>MKCOL</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
921 <literal>COPY</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
922 <literal>MOVE</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
923 <literal>OPTIONS</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
924 <literal>PROPFIND</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
925 <literal>PROPPATCH</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
926 <literal>LOCK</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
927 <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
928 or
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
929 <literal>PATCH</literal>.
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
930 Allowing the <literal>GET</literal> method also allows the
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
931 <literal>HEAD</literal> method.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
932 Access to other methods can be limited using the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
933 <link doc="ngx_http_access_module.xml">ngx_http_access_module</link>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
934 and
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
935 <link doc="ngx_http_auth_basic_module.xml">ngx_http_auth_basic_module</link>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
936 modules directives:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
937 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
938 limit_except GET {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
939 allow 192.168.1.0/32;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
940 deny all;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
941 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
942 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
943 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
944 <emphasis>except</emphasis> GET and HEAD.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
945 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
946
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
947 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
948
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
949
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
950 <directive name="limit_rate">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
951 <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
952 <default>0</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
953 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
954 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
955 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
956 <context>if in location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
957
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
958 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
959 Rate limits the transmission of a response to a client.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
960 The <value>rate</value> is specified in bytes per second.
767
1bb8b733416a Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents: 747
diff changeset
961 The value 0 disables rate limiting.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
962 <!--
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
963 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
964 -->
767
1bb8b733416a Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents: 747
diff changeset
965 The limit is set per request, so if a client simultaneously opens
1bb8b733416a Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents: 747
diff changeset
966 two connections, an overall rate will be twice as much
1bb8b733416a Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents: 747
diff changeset
967 as the specified limit.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
968 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
969
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
970 <para>
767
1bb8b733416a Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents: 747
diff changeset
971 Rate limit can also be set in the <var>$limit_rate</var> variable.
1bb8b733416a Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents: 747
diff changeset
972 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
973 depending on a certain condition:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
974 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
975 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
976
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
977 if ($slow) {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
978 set $limit_rate 4k;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
979 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
980
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
981 ...
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
982 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
983 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
984 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
985
506
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 503
diff changeset
986 <para>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 503
diff changeset
987 In addition, 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
988 <header>X-Accel-Limit-Rate</header> header field of a proxied server response.
506
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 503
diff changeset
989 This ability can be disabled using the
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 503
diff changeset
990 <link doc="ngx_http_proxy_module.xml" id="proxy_ignore_headers"/>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 503
diff changeset
991 and
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 503
diff changeset
992 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_ignore_headers"/>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 503
diff changeset
993 directives.
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 503
diff changeset
994 </para>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 503
diff changeset
995
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
996 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
997
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
998
171
6eeaa9e1f3b5 Made "appeared-in" an element, and added support for
Ruslan Ermilov <ru@nginx.com>
parents: 169
diff changeset
999 <directive name="limit_rate_after">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1000 <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
1001 <default>0</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1002 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1003 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1004 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1005 <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
1006 <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
1007
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1008 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1009 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
1010 of a response to a client will be rate limited.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1011 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1012
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1013 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1014 Example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1015 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1016 location /flv/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1017 flv;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1018 limit_rate_after 500k;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1019 limit_rate 50k;
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 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1022 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1023
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1024 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1025
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1026
172
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1027 <directive name="lingering_close">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1028 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1029 <literal>off</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1030 <literal>on</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1031 <literal>always</literal></syntax>
172
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1032 <default>on</default>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1033 <context>http</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1034 <context>server</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1035 <context>location</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1036 <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
1037 <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
1038
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1039 <para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1040 Controls how nginx closes client connections.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1041 </para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1042
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1043 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1044 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
1045 <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
1046 <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
1047 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
1048 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
1049 </para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1050
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1051 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1052 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
1053 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
1054 </para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1055
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1056 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1057 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
1058 more data and close the connection immediately.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1059 This breaks the protocol and should not be used under normal circumstances.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1060 </para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1061
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1062 </directive>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1063
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1064
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1065 <directive name="lingering_time">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1066 <syntax><value>time</value></syntax>
172
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1067 <default>30s</default>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1068 <context>http</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1069 <context>server</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1070 <context>location</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1071
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1072 <para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1073 When <link id="lingering_close"/> is in effect,
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1074 this directive specifies a maximum time during which nginx
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1075 will process (read and ignore) additional data coming from a client.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1076 After that, the connection is closed, even if there are more data.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1077 </para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1078
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1079 </directive>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1080
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1081
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1082 <directive name="lingering_timeout">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1083 <syntax><value>time</value></syntax>
172
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1084 <default>5s</default>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1085 <context>http</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1086 <context>server</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1087 <context>location</context>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1088
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1089 <para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1090 When <link id="lingering_close"/> is in effect, this directive specifies
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1091 a maximum waiting time for more client data to arrive.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1092 If data are not received during this time, the connection is closed.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1093 Otherwise, data are read and ignored, then nginx waits again for more data.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1094 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
1095 <link id="lingering_time"/> directive.
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1096 </para>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1097
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1098 </directive>
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1099
5e8e63f73c33 Documented "lingering_close", "lingering_time", and "lingering_timeout".
Ruslan Ermilov <ru@nginx.com>
parents: 171
diff changeset
1100
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1101 <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
1102 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1103 <value>address</value>[:<value>port</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1104 [<literal>default_server</literal>]
869
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1105 [<literal>ssl</literal>]
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1106 [<literal>spdy</literal>]
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1107 [<literal>setfib</literal>=<value>number</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1108 [<literal>backlog</literal>=<value>number</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1109 [<literal>rcvbuf</literal>=<value>size</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1110 [<literal>sndbuf</literal>=<value>size</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1111 [<literal>accept_filter</literal>=<value>filter</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1112 [<literal>deferred</literal>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1113 [<literal>bind</literal>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1114 [<literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1115 [<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
1116 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1117 <value>port</value>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1118 [<literal>default_server</literal>]
869
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1119 [<literal>ssl</literal>]
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1120 [<literal>spdy</literal>]
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1121 [<literal>setfib</literal>=<value>number</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1122 [<literal>backlog</literal>=<value>number</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1123 [<literal>rcvbuf</literal>=<value>size</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1124 [<literal>sndbuf</literal>=<value>size</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1125 [<literal>accept_filter</literal>=<value>filter</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1126 [<literal>deferred</literal>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1127 [<literal>bind</literal>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1128 [<literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1129 [<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
1130 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1131 <literal>unix:</literal><value>path</value>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1132 [<literal>default_server</literal>]
869
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1133 [<literal>ssl</literal>]
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1134 [<literal>spdy</literal>]
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1135 [<literal>backlog</literal>=<value>number</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1136 [<literal>rcvbuf</literal>=<value>size</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1137 [<literal>sndbuf</literal>=<value>size</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1138 [<literal>accept_filter</literal>=<value>filter</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1139 [<literal>deferred</literal>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1140 [<literal>bind</literal>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1141 [<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
1142 <default>*:80 | *:8000</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1143 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1144
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1145 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1146 Sets an <value>address</value> and a <value>port</value> for IP,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1147 or a <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
1148 the server will accept requests.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1149 Only one of <value>address</value> or <value>port</value> may be
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1150 specified.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1151 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
1152 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1153 listen 127.0.0.1:8000;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1154 listen 127.0.0.1;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1155 listen 8000;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1156 listen *:8000;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1157 listen localhost:8000;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1158 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1159 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
1160 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1161 listen [::]:8000;
941
7d1d53d4d293 Removed link-scoped IPv6 addresses from examples.
Ruslan Ermilov <ru@nginx.com>
parents: 940
diff changeset
1162 listen [::1];
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1163 </example>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1164 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
1165 prefix:
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1166 <example>
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1167 listen unix:/var/run/nginx.sock;
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1168 </example>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1169 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1170
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1171 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1172 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
1173 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1174
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1175 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1176 If directive is not present then either the <literal>*:80</literal> is used
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1177 if nginx runs with superuser privileges, or <literal>*:8000</literal> otherwise.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1178 </para>
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 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1181 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
1182 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
1183 <value>address</value>:<value>port</value> pair.
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1184 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
1185 parameter then the first server with the
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1186 <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
1187 the default server for this pair.
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1188 <note>
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1189 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
1190 <literal>default</literal>.
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1191 </note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1192 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1193
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1194 <para>
869
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1195 The <literal>ssl</literal> parameter (0.7.14) allows to specify that all
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1196 connections accepted on this port should work in SSL mode.
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1197 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
1198 id="single_http_https_server">configuration</link> for the server that
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1199 handles both HTTP and HTTPS requests.
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1200 </para>
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1201
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1202 <para>
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1203 The <literal>spdy</literal> parameter (1.3.15) allows to accept
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1204 <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
1205 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
1206 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
1207 connections without SSL.
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1208 </para>
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1209
ade81792bdaa Documented SPDY support.
Homutov Vladimir <vl@nginx.com>
parents: 840
diff changeset
1210 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1211 A <literal>listen</literal> directive
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1212 can have several additional parameters specific to socket-related system calls.
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1213 They can be specified in any
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1214 <literal>listen</literal> directive, but only once for the given
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1215 <value>address</value>:<value>port</value> pair.
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1216 <note>
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1217 In versions prior to 0.8.21, they could only be
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1218 specified in the <literal>listen</literal> directive along with the
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1219 <literal>default</literal> parameter.
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1220 </note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1221 <list type="tag">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1222
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1223 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1224 <literal>setfib</literal>=<value>number</value>
66
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1225 </tag-name>
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1226 <tag-desc>
625
af3f38e349eb Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents: 617
diff changeset
1227 this parameter (0.8.44) sets an associated routing table, FIB
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1228 (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
1229 This currently works only on FreeBSD.
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1230 </tag-desc>
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1231
9332d7a02822 In the "listen" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 65
diff changeset
1232 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1233 <literal>backlog</literal>=<value>number</value>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1234 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1235 <tag-desc>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1236 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
1237 <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
1238 the maximum length for the queue of pending connections.
741
082a725038db Fixed default backlog value description for Mac OS X
Sergey Budnevitch <sb@waeme.net>
parents: 738
diff changeset
1239 By default, <literal>backlog</literal> is set to -1 on FreeBSD and Mac OS X,
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1240 and to 511 on other platforms.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1241 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1242
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1243 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1244 <literal>rcvbuf</literal>=<value>size</value>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1245 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1246 <tag-desc>
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1247 sets receive buffer size
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1248 (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
1249 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1250
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1251 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1252 <literal>sndbuf</literal>=<value>size</value>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1253 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1254 <tag-desc>
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1255 sets send buffer size
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1256 (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
1257 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1258
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1259 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1260 <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
1261 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1262 <tag-desc>
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1263 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
1264 (the <c-def>SO_ACCEPTFILTER</c-def> option) for the listening socket
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1265 that filters incoming connections before presenting them to
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1266 <c-func>accept</c-func>.
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1267 This works only on FreeBSD and NetBSD 5.0+.
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1268 Acceptable values are
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1269 <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
1270 and
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1271 <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
1272 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1273
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1274 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1275 <literal>deferred</literal>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1276 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1277 <tag-desc>
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1278 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
1279 (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
1280 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1281
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1282 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1283 <literal>bind</literal>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1284 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1285 <tag-desc>
240
472e88bf177e Slightly better wording for the "bind" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 237
diff changeset
1286 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
1287 <value>address</value>:<value>port</value> pair.
240
472e88bf177e Slightly better wording for the "bind" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 237
diff changeset
1288 This is because nginx will <c-func>bind</c-func> only to
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1289 <literal>*:</literal><value>port</value>
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1290 if there are several <literal>listen</literal> directives with
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1291 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
1292 <literal>listen</literal> directives listens on all addresses
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1293 for the given port (<literal>*:</literal><value>port</value>).
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1294 It should be noted that in this case a <c-func>getsockname</c-func>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1295 system call will be made to determine an address that accepted a
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1296 connection.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1297 If parameters <literal>backlog</literal>, <literal>rcvbuf</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1298 <literal>sndbuf</literal>, <literal>accept_filter</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1299 <literal>deferred</literal>, or <literal>so_keepalive</literal>
223
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1300 are used then for a given
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1301 <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
1302 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
1303 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1304
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1305 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1306 <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
1307 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1308 <tag-desc>
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1309 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
1310 (via the <c-def>IPV6_V6ONLY</c-def> socket option)
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1311 whether IPv6 socket listening on a wildcard address <literal>[::]</literal>
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1312 will accept only IPv6 connections, or both IPv6 and IPv4 connections.
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1313 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
1314 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
1315 <note>
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1316 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
1317 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
1318 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
1319 </note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1320 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1321
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1322 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1323 <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
1324 </tag-name>
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1325 <tag-desc>
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1326 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
1327 for the listening socket.
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1328 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
1329 in effect for the socket.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1330 If set to the value “<literal>on</literal>”, the <c-def>SO_KEEPALIVE</c-def>
223
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1331 socket option is turned on for the socket.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1332 If set to the value “<literal>off</literal>”, the <c-def>SO_KEEPALIVE</c-def>
223
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1333 socket option is turned off for the socket.
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1334 Some operating systems support tuning TCP keepalive parameters on a per-socket
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1335 basis using the <c-def>TCP_KEEPIDLE</c-def>, <c-def>TCP_KEEPINTVL</c-def>,
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1336 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
1337 On such systems (currently, Linux 2.4+, NetBSD 5+, and
454
daafc5600fc4 FreeBSD 9.0-STABLE supports the TCP_KEEPIDLE, TCP_KEEPINTVL, and
Ruslan Ermilov <ru@nginx.com>
parents: 453
diff changeset
1338 FreeBSD 9.0-STABLE) they can be configured
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1339 using the <value>keepidle</value>, <value>keepintvl</value>, and
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1340 <value>keepcnt</value> parameters.
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1341 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
1342 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
1343 For example,
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1344 <example>so_keepalive=30m::10</example>
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1345 will set idle timeout (<c-def>TCP_KEEPIDLE</c-def>) to 30 minutes,
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1346 leave probe interval (<c-def>TCP_KEEPINTVL</c-def>) at its system default,
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1347 and set probes count (<c-def>TCP_KEEPCNT</c-def>) to 10 probes.
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1348 </tag-desc>
09b8c8b2b865 Documented the "so_keepalive" parameter of the "listen" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 185
diff changeset
1349
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1350 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1351 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1352
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1353 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1354 Example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1355 <example>
617
368a449e85b8 Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents: 615
diff changeset
1356 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
1357 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1358 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1359
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1360 </directive>
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
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1363 <directive name="location">
108
72524ae53106 Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents: 106
diff changeset
1364 <syntax block="yes">[
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1365 <literal>=</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1366 <literal>~</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1367 <literal>~*</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1368 <literal>^~</literal>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1369 ] <value>uri</value></syntax>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1370 <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
1371 <default/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1372 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1373 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1374
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1375 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1376 Sets a configuration based on a request URI.
503
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1377 </para>
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1378
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1379 <para>
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1380 The matching is performed against a normalized URI,
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1381 after decoding a text encoded in the “<literal>%XX</literal>” form,
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1382 resolving references to relative path components “<literal>.</literal>”
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1383 and “<literal>..</literal>”, and possible
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1384 <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
1385 adjacent slashes into a single slash.
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1386 </para>
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1387
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
1388 <para>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1389 A location can either be defined by a prefix string, or by a regular expression.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1390 Regular expressions are specified by prepending them with the
810
7c72c3e67e77 The "location" directive: improved wording.
Ruslan Ermilov <ru@nginx.com>
parents: 779
diff changeset
1391 “<literal>~*</literal>” modifier (for case-insensitive matching), or with the
7c72c3e67e77 The "location" directive: improved wording.
Ruslan Ermilov <ru@nginx.com>
parents: 779
diff changeset
1392 “<literal>~</literal>” modifier (for case-sensitive matching).
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1393 To find a location matching a given request, nginx first checks
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1394 locations defined using the prefix strings (prefix locations).
88
6876e2558d09 Spell checking.
Ruslan Ermilov <ru@nginx.com>
parents: 86
diff changeset
1395 Among them, the most specific one is searched.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1396 Then regular expressions are checked, in the order of their appearance
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1397 in a configuration file.
244
9e2be02df2ce Fixed wording.
Ruslan Ermilov <ru@nginx.com>
parents: 241
diff changeset
1398 A search of regular expressions terminates on the first match,
9e2be02df2ce Fixed wording.
Ruslan Ermilov <ru@nginx.com>
parents: 241
diff changeset
1399 and the corresponding configuration is used.
9e2be02df2ce Fixed wording.
Ruslan Ermilov <ru@nginx.com>
parents: 241
diff changeset
1400 If no match with a regular expression is found then a
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1401 configuration of the most specific prefix location is used.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1402 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1403
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1404 <para>
67
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1405 Locations can be nested, with some exceptions mentioned below.
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1406 </para>
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1407
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1408 <para>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1409 For case-insensitive operating systems such as Mac OS X and Cygwin,
244
9e2be02df2ce Fixed wording.
Ruslan Ermilov <ru@nginx.com>
parents: 241
diff changeset
1410 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
1411 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
1412 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1413
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1414 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1415 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
1416 be used in other directives.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1417 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1418
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1419 <para>
810
7c72c3e67e77 The "location" directive: improved wording.
Ruslan Ermilov <ru@nginx.com>
parents: 779
diff changeset
1420 If the most specific 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
1421 then regular expressions are not checked.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1422 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1423
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1424 <para>
810
7c72c3e67e77 The "location" directive: improved wording.
Ruslan Ermilov <ru@nginx.com>
parents: 779
diff changeset
1425 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
1426 an exact match of URI and location.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1427 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
1428 For example, if a “<literal>/</literal>” request happens frequently,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1429 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
1430 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
1431 comparison.
67
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1432 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
1433 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1434
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1435 <para>
67
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1436 <note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1437 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
1438 location without the “<literal>=</literal>” and “<literal>^~</literal>”
810
7c72c3e67e77 The "location" directive: improved wording.
Ruslan Ermilov <ru@nginx.com>
parents: 779
diff changeset
1439 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
1440 not checked.
67
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1441 </note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1442 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1443
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1444 <para>
625
af3f38e349eb Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents: 617
diff changeset
1445 Let’s illustrate the above by example:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1446 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1447 location = / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1448 [ configuration A ]
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1449 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1450
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1451 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1452 [ configuration B ]
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1453 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1454
738
0914bbb59fd2 Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents: 711
diff changeset
1455 location /documents/ {
0914bbb59fd2 Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents: 711
diff changeset
1456 [ configuration C ]
0914bbb59fd2 Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents: 711
diff changeset
1457 }
0914bbb59fd2 Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents: 711
diff changeset
1458
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1459 location ^~ /images/ {
738
0914bbb59fd2 Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents: 711
diff changeset
1460 [ configuration D ]
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1461 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1462
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1463 location ~* \.(gif|jpg|jpeg)$ {
738
0914bbb59fd2 Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents: 711
diff changeset
1464 [ configuration E ]
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1465 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1466 </example>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1467 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
1468 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
1469 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
1470 configuration C,
0914bbb59fd2 Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents: 711
diff changeset
1471 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
1472 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
1473 </para>
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 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1476 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
1477 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
1478 used for request redirection.
67
d98323a15ba4 Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents: 66
diff changeset
1479 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
1480 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1481
914
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1482 <para>
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1483 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
1484 and requests are processed by one of
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1485 <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
1486 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass"/>,
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1487 <link doc="ngx_http_scgi_module.xml" id="scgi_pass"/>,
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1488 <link doc="ngx_http_uwsgi_module.xml" id="uwsgi_pass"/>, or
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1489 <link doc="ngx_http_memcached_module.xml" id="memcached_pass"/>,
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1490 then in response to a request with URI equal to this string,
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1491 but without the trailing slash,
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1492 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
1493 with the slash appended.
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1494 If this is undesired, an exact match of the URI and location could be
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1495 defined like this:
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1496 <example>
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1497 location /user/ {
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1498 proxy_pass http://user.example.com;
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1499 }
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1500
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1501 location = /user {
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1502 proxy_pass http://login.example.com;
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1503 }
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1504 </example>
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1505 </para>
474a21f26a2a Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents: 871
diff changeset
1506
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1507 <!--
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1508 <migration from="Apache" directive="Location" />
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1509 -->
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1510
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1511 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1512
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1513
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1514 <directive name="log_not_found">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1515 <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
1516 <default>on</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1517 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1518 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1519 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1520
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1521 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1522 Enables or disables logging of errors about not found files into the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1523 <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
1524 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1525
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1526 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1527
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1528
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1529 <directive name="log_subrequest">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1530 <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
1531 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1532 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1533 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1534 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1535
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1536 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1537 Enables or disables logging of subrequests into the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1538 <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
1539 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1540
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1541 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1542
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1543
175
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1544 <directive name="max_ranges">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1545 <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
1546 <default/>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1547 <context>http</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1548 <context>server</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1549 <context>location</context>
499
76a8eca844d0 Documented that "max_ranges" appeared in 1.1.2.
Ruslan Ermilov <ru@nginx.com>
parents: 477
diff changeset
1550 <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
1551
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1552 <para>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1553 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
1554 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
1555 byte ranges specified.
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1556 By default, there is no limit.
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1557 The value of zero disables the byte-range support completely.
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1558 </para>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1559
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1560 </directive>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1561
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1562
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1563 <directive name="merge_slashes">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1564 <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
1565 <default>on</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1566 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1567 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1568
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1569 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1570 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
1571 in a URI into a single slash.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1572 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1573
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1574 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1575 Note that compression is essential for the correct prefix string
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1576 and regular expressions location matching.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1577 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
1578 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1579 location /scripts/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1580 ...
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1581 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1582 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1583 and might be processed as a static file,
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1584 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
1585 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1586
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1587 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1588 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
1589 contains base64-encoded names, since base64 uses the “<literal>/</literal>”
246
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
1590 character internally.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1591 However, for security considerations, it is better to avoid turning off
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1592 the compression.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1593 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1594
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1595 <para>
442
b423d725a932 Try to emphasize that "underscores_in_headers" and "merge_slashes",
Ruslan Ermilov <ru@nginx.com>
parents: 438
diff changeset
1596 A directive can be specified on the <link id="server"/> level
b423d725a932 Try to emphasize that "underscores_in_headers" and "merge_slashes",
Ruslan Ermilov <ru@nginx.com>
parents: 438
diff changeset
1597 in a default server.
b423d725a932 Try to emphasize that "underscores_in_headers" and "merge_slashes",
Ruslan Ermilov <ru@nginx.com>
parents: 438
diff changeset
1598 In this case, its value will cover all virtual servers
b423d725a932 Try to emphasize that "underscores_in_headers" and "merge_slashes",
Ruslan Ermilov <ru@nginx.com>
parents: 438
diff changeset
1599 listening on the same address and port.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1600 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1601
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1602 </directive>
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
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1605 <directive name="msie_padding">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1606 <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
1607 <default>on</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1608 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1609 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1610 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1611
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1612 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1613 Enables or disables adding of comments to responses with status
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1614 greater than 400 for MSIE clients, to pad the response size to 512 bytes.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1615 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1616
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1617 </directive>
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
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1620 <directive name="msie_refresh">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1621 <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
1622 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1623 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1624 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1625 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1626
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1627 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1628 Enables or disables issuing refreshes instead of redirects, for MSIE clients.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1629 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1630
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1631 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1632
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1633
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1634 <directive name="open_file_cache">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1635 <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
1636 <syntax>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1637 <literal>max</literal>=<value>N</value>
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1638 [<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
1639 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1640 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1641 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1642 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1643
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1644 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1645 Configures a cache that can store:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1646 <list type="bullet">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1647
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1648 <listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1649 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
1650 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1651
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1652 <listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1653 directory lookups;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1654 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1655
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1656 <listitem>
68
9de85defbcf8 - "optimize_server_names" is deprecated in favour of "server_name_in_redirects"
Ruslan Ermilov <ru@nginx.com>
parents: 67
diff changeset
1657 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
1658 and so on.
246
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
1659 <note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1660 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
1661 <link id="open_file_cache_errors"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1662 directive.
246
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
1663 </note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1664 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1665
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1666 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1667 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1668
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1669 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1670 The directive has the following parameters:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1671 <list type="tag">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1672
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1673 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1674 <literal>max</literal>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1675 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1676 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1677 sets the maximum number of elements in the cache;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1678 on cache overflow the least recently used (LRU) elements get removed;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1679 </tag-desc>
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 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1682 <literal>inactive</literal>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1683 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1684 <tag-desc>
68
9de85defbcf8 - "optimize_server_names" is deprecated in favour of "server_name_in_redirects"
Ruslan Ermilov <ru@nginx.com>
parents: 67
diff changeset
1685 defines a time, after which an element gets removed from the cache
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1686 if there were no accesses to it during this time;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1687 by default, it is 60 seconds;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1688 </tag-desc>
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 <tag-name>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1691 <literal>off</literal>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1692 </tag-name>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1693 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1694 disables the cache.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1695 </tag-desc>
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 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1698 </para>
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 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1701 Example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1702 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1703 open_file_cache max=1000 inactive=20s;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1704 open_file_cache_valid 30s;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1705 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
1706 open_file_cache_errors on;<!--
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1707 open_file_cache_events on;
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 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1710 </para>
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 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1713
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1714
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1715 <directive name="open_file_cache_errors">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1716 <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
1717 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1718 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1719 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1720 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1721
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1722 <para>
68
9de85defbcf8 - "optimize_server_names" is deprecated in favour of "server_name_in_redirects"
Ruslan Ermilov <ru@nginx.com>
parents: 67
diff changeset
1723 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
1724 <link id="open_file_cache"/>.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1725 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1726
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1727 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1728
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1729
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1730 <!--
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1731
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1732 <directive name="open_file_cache_events">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1733 <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
1734 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1735 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1736 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1737 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1738
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1739 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1740 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
1741 <link id="open_file_cache"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1742 elements.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1743 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
1744 <link doc="../events.xml" id="kqueue"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1745 method only.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1746 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
1747 support events for arbitrary file system types.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1748 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
1749 file systems such as UFS or FFS.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1750 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1751
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1752 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1753
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1754 -->
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
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1757 <directive name="open_file_cache_min_uses">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1758 <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
1759 <default>1</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1760 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1761 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1762 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1763
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1764 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1765 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
1766 the period configured by the <literal>inactive</literal> parameter
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1767 of the <link id="open_file_cache"/> directive,
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1768 after which a file descriptor will remain open in the cache.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1769 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1770
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1771 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1772
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 name="open_file_cache_valid">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1775 <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
1776 <default>60s</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1777 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1778 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1779 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1780
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1781 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1782 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
1783 <link id="open_file_cache"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1784 elements should be validated.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1785 <!--
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1786 When
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1787 <link id="open_file_cache_events"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1788 is enabled, open file descriptors
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1789 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
1790 -->
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1791 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1792
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1793 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1794
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1795
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1796 <directive name="optimize_server_names">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1797 <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
1798 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1799 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1800 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1801
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1802 <para>
68
9de85defbcf8 - "optimize_server_names" is deprecated in favour of "server_name_in_redirects"
Ruslan Ermilov <ru@nginx.com>
parents: 67
diff changeset
1803 This directive is made obsolete by the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1804 <link id="server_name_in_redirect"/> directive.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1805 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1806
68
9de85defbcf8 - "optimize_server_names" is deprecated in favour of "server_name_in_redirects"
Ruslan Ermilov <ru@nginx.com>
parents: 67
diff changeset
1807 <!--
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1808 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1809 Enables or disables optimization of hostname checking in name-based
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1810 virtual servers.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1811 In particular, the checking affects hostnames used in redirects.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1812 If optimization is enabled, and all name-based servers listening on
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1813 the same address:port pair have identical configuration, then
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1814 names are not checked during request processing, and the first
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1815 server name is used in redirects.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1816 In case redirects should use hostnames sent by clients,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1817 optimization needs to be disabled.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1818 </para>
68
9de85defbcf8 - "optimize_server_names" is deprecated in favour of "server_name_in_redirects"
Ruslan Ermilov <ru@nginx.com>
parents: 67
diff changeset
1819 -->
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1820
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1821 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1822
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1823
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1824 <directive name="port_in_redirect">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1825 <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
1826 <default>on</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1827 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1828 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1829 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1830
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1831 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1832 Enables or disables specifying the port in redirects issued by nginx.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1833 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1834
159
8c124aef0041 Cross-linked "server_name_in_redirect" and "port_in_redirect" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 152
diff changeset
1835 <para>
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
1836 The use of a primary server name in redirects is controlled by
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
1837 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
1838 </para>
8c124aef0041 Cross-linked "server_name_in_redirect" and "port_in_redirect" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 152
diff changeset
1839
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1840 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1841
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1842
175
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1843 <directive name="postpone_output">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1844 <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
1845 <default>1460</default>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1846 <context>http</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1847 <context>server</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1848 <context>location</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1849
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1850 <para>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1851 If possible, the output of client data will be postponed until
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1852 nginx has at least <value>size</value> bytes of data to send.
175
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1853 Value of zero disables postponing.
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1854 </para>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1855
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1856 </directive>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1857
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
1858
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1859 <directive name="read_ahead">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1860 <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
1861 <default>0</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1862 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1863 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1864 <context>location</context>
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 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1867 Sets the amount of pre-reading when working with files, in the kernel.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1868 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1869
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1870 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1871 On Linux, the
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1872 <literal>posix_fadvise(0, 0, 0, POSIX_FADV_SEQUENTIAL)</literal>
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1873 system call is used, 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
1874 </para>
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>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1877 On FreeBSD, the
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1878 <literal>fcntl(O_READAHEAD,</literal>
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1879 <value>size</value><literal>)</literal>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1880 system call is used, supported in FreeBSD&nbsp;9.0-CURRENT.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1881 FreeBSD&nbsp;7 needs to be
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1882 <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
1883 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1884
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1885 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1886
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1887
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1888 <directive name="recursive_error_pages">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1889 <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
1890 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1891 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1892 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1893 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1894
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1895 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1896 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
1897 <link id="error_page"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1898 directive.
709
a4648185190a Fixed the link internal to the module.
Ruslan Ermilov <ru@nginx.com>
parents: 679
diff changeset
1899 There is a <link id="internal">limit</link> on a number of such redirects.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1900 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1901
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1902 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1903
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1904
169
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1905 <directive name="request_pool_size">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1906 <syntax><value>size</value></syntax>
169
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1907 <default>4k</default>
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1908 <context>http</context>
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1909 <context>server</context>
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1910
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1911 <para>
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1912 Allows to fine tune per-request memory allocations.
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1913 This directive has minimal impact on performance,
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1914 and should not generally be used.
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1915 </para>
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1916
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1917 </directive>
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1918
b7b160e4e046 Rstored alphabetical order of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 162
diff changeset
1919
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1920 <directive name="reset_timedout_connection">
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
1921 <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
1922 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1923 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1924 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1925 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1926
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1927 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1928 Enables or disables resetting of timed out connections.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1929 The reset is performed as follows: before closing a socket, the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1930 <c-def>SO_LINGER</c-def>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1931 option is set on it with a timeout value of 0.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1932 When the socket is closed, a client is sent TCP RST, and all memory
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1933 occupied by this socket is freed.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1934 This avoids keeping of an already closed socket with filled buffers
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1935 for a long time, in a FIN_WAIT1 state.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1936 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1937
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1938 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1939 It should be noted that timed out keep-alive connections are still
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1940 closed normally.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1941 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1942
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1943 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1944
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1945
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1946 <directive name="resolver">
185
05e7496801ec Documented recent changes in the "resolver" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 176
diff changeset
1947 <syntax>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1948 <value>address</value> ...
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1949 [<literal>valid</literal>=<value>time</value>]</syntax>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1950 <default/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1951 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1952 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1953 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1954
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1955 <para>
527
58d79f8c412d Documented 1.3.1 changes in "resolver".
Ruslan Ermilov <ru@nginx.com>
parents: 522
diff changeset
1956 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
1957 into addresses, for example:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1958 <example>
527
58d79f8c412d Documented 1.3.1 changes in "resolver".
Ruslan Ermilov <ru@nginx.com>
parents: 522
diff changeset
1959 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
1960 </example>
527
58d79f8c412d Documented 1.3.1 changes in "resolver".
Ruslan Ermilov <ru@nginx.com>
parents: 522
diff changeset
1961 An address can be specified as a domain name or IP address,
566
f8148fc88224 Documented 1.2.2 changes.
Ruslan Ermilov <ru@nginx.com>
parents: 553
diff changeset
1962 and 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
1963 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
1964 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
1965 <note>
370cf5ccd3ca The "resolver" directive now allows specifying multiple name servers.
Ruslan Ermilov <ru@nginx.com>
parents: 140
diff changeset
1966 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
1967 Specifying name servers using IPv6 addresses is supported
566
f8148fc88224 Documented 1.2.2 changes.
Ruslan Ermilov <ru@nginx.com>
parents: 553
diff changeset
1968 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
1969 </note>
185
05e7496801ec Documented recent changes in the "resolver" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 176
diff changeset
1970 By default, nginx caches answers using the TTL value of a response.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1971 An optional <literal>valid</literal> parameter allows to override it:
185
05e7496801ec Documented recent changes in the "resolver" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 176
diff changeset
1972 <example>
527
58d79f8c412d Documented 1.3.1 changes in "resolver".
Ruslan Ermilov <ru@nginx.com>
parents: 522
diff changeset
1973 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
1974 </example>
05e7496801ec Documented recent changes in the "resolver" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 176
diff changeset
1975 <note>
05e7496801ec Documented recent changes in the "resolver" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 176
diff changeset
1976 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
1977 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
1978 </note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1979 </para>
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>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1982
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1983
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1984 <directive name="resolver_timeout">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
1985 <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
1986 <default>30s</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1987 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1988 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1989 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1990
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1991 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1992 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
1993 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1994 resolver_timeout 5s;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1995 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1996 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1997
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1998 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1999
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 name="root">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2002 <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
2003 <default>html</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2004 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2005 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2006 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2007 <context>if in location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2008
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2009 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2010 Sets the root directory for requests.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2011 For example, with the following configuration
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2012 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2013 location /i/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2014 root /data/w3;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2015 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2016 </example>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2017 “<literal>/i/top.gif</literal>” will be responded
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2018 with the file
148
682163f2b298 Unified article/path and module/pathname into a single "path".
Ruslan Ermilov <ru@nginx.com>
parents: 147
diff changeset
2019 <path>/data/w3/i/top.gif</path>.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2020 </para>
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 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2023 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
2024 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
2025 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2026
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2027 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2028 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
2029 of the <literal>root</literal> directive.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2030 If a URI need to be modified, the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
2031 <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
2032 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2033
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2034 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2035
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2036
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2037 <directive name="satisfy">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2038 <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
2039 <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
2040 <context>http</context>
935beaa561b3 - use of $document_root and $realpath_root in "root" is prohibited
Ruslan Ermilov <ru@nginx.com>
parents: 68
diff changeset
2041 <context>server</context>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2042 <context>location</context>
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 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2045 Allows access if <literal>all</literal> or <literal>any</literal> of the
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2046 <link doc="ngx_http_access_module.xml">ngx_http_access_module</link>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2047 or <link doc="ngx_http_auth_basic_module.xml">ngx_http_auth_basic_module</link>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2048 modules grant access.
246
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
2049 </para>
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
2050
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
2051 <para>
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
2052 Example:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2053 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2054 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2055 satisfy any;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2056
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2057 allow 192.168.1.0/32;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2058 deny all;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2059
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2060 auth_basic "closed site";
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2061 auth_basic_user_file conf/htpasswd;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2062 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2063 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2064 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2065
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2066 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2067
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2068
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2069 <directive name="satisfy_any">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2070 <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
2071 <default>off</default>
69
935beaa561b3 - use of $document_root and $realpath_root in "root" is prohibited
Ruslan Ermilov <ru@nginx.com>
parents: 68
diff changeset
2072 <context>http</context>
935beaa561b3 - use of $document_root and $realpath_root in "root" is prohibited
Ruslan Ermilov <ru@nginx.com>
parents: 68
diff changeset
2073 <context>server</context>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2074 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2075
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2076 <para>
406
98dac2bd7598 Links with mixed underscores and spaces were hard to read, eliminated them.
Ruslan Ermilov <ru@nginx.com>
parents: 400
diff changeset
2077 This directive has been replaced by the <literal>any</literal>
98dac2bd7598 Links with mixed underscores and spaces were hard to read, eliminated them.
Ruslan Ermilov <ru@nginx.com>
parents: 400
diff changeset
2078 parameter of the <link id="satisfy"/> directive.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2079 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2080
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2081 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2082
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2083
176
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2084 <directive name="send_lowat">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2085 <syntax><value>size</value></syntax>
176
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2086 <default>0</default>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2087 <context>http</context>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2088 <context>server</context>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2089 <context>location</context>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2090
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2091 <para>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2092 If set to a non-zero value, nginx will try to minimize the number
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2093 of send operations on client sockets by using either
553
6330ca27a485 Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents: 541
diff changeset
2094 <c-def>NOTE_LOWAT</c-def> flag of the
6330ca27a485 Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents: 541
diff changeset
2095 <link doc="../events.xml" id="kqueue"/> method,
176
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2096 or the <c-def>SO_SNDLOWAT</c-def> socket option,
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2097 with the specified <value>size</value>.
176
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2098 </para>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2099
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2100 <para>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2101 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
2102 </para>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2103
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2104 </directive>
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2105
0883fc5aabc9 Documented the "keepalive_disable" and "send_lowat" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 175
diff changeset
2106
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2107 <directive name="send_timeout">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2108 <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
2109 <default>60s</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2110 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2111 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2112 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2113
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 Sets a timeout for transmitting a response to the client.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2116 A timeout is only set between two successive write operations,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2117 not for the transmission of the whole response.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2118 If a client does not receive anything within this time,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2119 a connection is closed.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2120 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2121
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2122 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2123
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 name="sendfile">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2126
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2127 <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
2128 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2129 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2130 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2131 <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
2132 <context>if in location</context>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2133
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2134 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2135 Enables or disables the use of
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2136 <c-func>sendfile</c-func>.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2137 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2138
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2139 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2140
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2141
175
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2142 <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
2143
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2144 <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
2145 <default>0</default>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2146 <context>http</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2147 <context>server</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2148 <context>location</context>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2149
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2150 <para>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2151 When set to a non-zero value, limits the amount of data that can be
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2152 transferred in a single <c-func>sendfile</c-func> call.
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2153 Without the limit, one fast connection may seize the worker process.
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2154 </para>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2155
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2156 </directive>
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2157
3381ae6a93e4 Documented the max_ranges, postpone_output, and sendfile_max_chunk directives.
Ruslan Ermilov <ru@nginx.com>
parents: 174
diff changeset
2158
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2159 <directive name="server">
108
72524ae53106 Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents: 106
diff changeset
2160 <syntax block="yes"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2161 <default/>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2162 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2163
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2164 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2165 Sets a configuration for the virtual server.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2166 There is no clean separation between IP-based (based on the IP address)
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2167 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
2168 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
2169 Instead, the <link id="listen"/> directives describe all
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2170 addresses and ports that should accept connections for a server, and the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
2171 <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
2172 Example configurations are provided in the
ef11546f75ee Translated "request_processing" into Russian, removed "virtual_hosts"
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
2173 “<link doc="request_processing.xml"/>” document.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2174 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2175
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2176 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2177
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2178
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2179 <directive name="server_name">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2180 <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
2181 <default>""</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2182 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2183
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2184 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2185 Sets names of the virtual server, for example:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2186 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2187 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2188 server_name example.com www.example.com;
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 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2191 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2192
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2193 <para>
70
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
2194 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
2195 </para>
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2196
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2197 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2198 Server names can include an asterisk (“<literal>*</literal>”)
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2199 to replace the first or last part of a name:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2200 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2201 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2202 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
2203 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2204 </example>
628
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2205 Such names are called wildcard names.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2206 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2207
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2208 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2209 The first two of the above mentioned names can be combined:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2210 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2211 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2212 server_name .example.com;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2213 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2214 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2215 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2216
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2217 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2218 It is also possible to use regular expressions in server names,
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2219 prepending 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
2220 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2221 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2222 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
2223 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2224 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2225 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2226
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2227 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2228 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
2229 be used in other directives:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2230 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2231 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2232 server_name ~^(www\.)?(.+)$;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2233
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2234 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2235 root /sites/$2;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2236 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2237 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2238
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2239 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2240 server_name _;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2241
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2242 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2243 root /sites/default;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2244 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2245 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2246 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2247 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2248
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2249 <para>
70
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
2250 Named captures in regular expressions create variables (0.8.25)
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
2251 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
2252 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2253 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2254 server_name ~^(www\.)?(?&lt;domain&gt;.+)$;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2255
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2256 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2257 root /sites/$domain;
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 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2260
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2261 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2262 server_name _;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2263
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2264 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2265 root /sites/default;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2266 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2267 }
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 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2270
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2271 <para>
628
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2272 If the parameter equals “<var>$hostname</var>” (0.9.4), the
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2273 machine’s hostname is substituted.
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2274 </para>
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2275
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2276 <para>
70
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
2277 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
2278 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2279 server {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2280 server_name www.example.com "";
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2281 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2282 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2283 It allows this server to process requests without the <header>Host</header>
235
6d8356490215 Consistently call header fields as such.
Ruslan Ermilov <ru@nginx.com>
parents: 234
diff changeset
2284 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
2285 This is the default setting.
272d99af0c15 The "server_name" directive:
Ruslan Ermilov <ru@nginx.com>
parents: 69
diff changeset
2286 <note>
625
af3f38e349eb Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents: 617
diff changeset
2287 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
2288 </note>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2289 </para>
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 <para>
587
5bb7716cae7e Documented in more depth how server names are matched.
Ruslan Ermilov <ru@nginx.com>
parents: 580
diff changeset
2292 When searching for a virtual server by name,
5bb7716cae7e Documented in more depth how server names are matched.
Ruslan Ermilov <ru@nginx.com>
parents: 580
diff changeset
2293 if name matches more than one of the specified variants,
628
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2294 e.g. both wildcard name and regular expression match, the first matching
627
af23cb587b00 Typos fixed.
Vladimir Homutov <vl@nginx.com>
parents: 625
diff changeset
2295 variant will be chosen, in the following order of precedence:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2296 <list type="enum">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2297
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2298 <listitem>
628
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2299 exact name
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2300 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2301
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2302 <listitem>
628
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2303 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
2304 e.g. “<literal>*.example.com</literal>”
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2305 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2306
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2307 <listitem>
628
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2308 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
2309 e.g. “<literal>mail.*</literal>”
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2310 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2311
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2312 <listitem>
587
5bb7716cae7e Documented in more depth how server names are matched.
Ruslan Ermilov <ru@nginx.com>
parents: 580
diff changeset
2313 first matching regular expression
5bb7716cae7e Documented in more depth how server names are matched.
Ruslan Ermilov <ru@nginx.com>
parents: 580
diff changeset
2314 (in order of appearance in a configuration file)
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2315 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2316
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2317 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2318 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2319
628
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2320 <para>
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2321 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
2322 <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
2323 </para>
779a47d0acb0 Unified terminology used in the "server_name" directive and server_names.xml.
Vladimir Homutov <vl@nginx.com>
parents: 627
diff changeset
2324
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2325 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2326
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2327
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2328 <directive name="server_name_in_redirect">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2329 <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
2330 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2331 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2332 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2333 <context>location</context>
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 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2336 Enables or disables the use of the primary server name, specified by the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
2337 <link id="server_name"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2338 directive, in redirects issued by nginx.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2339 When disabled, the name from the <header>Host</header> request header field
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2340 is used.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2341 If this field is not present, an IP address of the server is used.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2342 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2343
159
8c124aef0041 Cross-linked "server_name_in_redirect" and "port_in_redirect" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 152
diff changeset
2344 <para>
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2345 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
2346 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
2347 </para>
8c124aef0041 Cross-linked "server_name_in_redirect" and "port_in_redirect" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 152
diff changeset
2348
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2349 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2350
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2351
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2352 <directive name="server_names_hash_bucket_size">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2353 <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
2354 <default>32|64|128</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2355 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2356
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2357 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2358 Sets the bucket size for the server names hash tables.
625
af3f38e349eb Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents: 617
diff changeset
2359 Default value depends on the size of the processor’s cache line.
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2360 Details of setting up hash tables are provided in a separate
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2361 <link doc="../hash.xml">document</link>.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2362 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2363
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2364 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2365
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2366
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2367 <directive name="server_names_hash_max_size">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2368 <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
2369 <default>512</default>
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2370 <context>http</context>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2371
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2372 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2373 Sets the maximum <value>size</value> of the server names hash tables.
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2374 Details of setting up hash tables are provided in a separate
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2375 <link doc="../hash.xml">document</link>.
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2376 </para>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2377
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2378 </directive>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2379
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2380
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2381 <directive name="server_tokens">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2382 <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
2383 <default>on</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2384 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2385 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2386 <context>location</context>
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 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2389 Enables or disables emitting of nginx version in error messages and in the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2390 <header>Server</header> response header field.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2391 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2392
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2393 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2394
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2395
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2396 <directive name="tcp_nodelay">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2397 <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
2398 <default>on</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2399 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2400 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2401 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2402
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2403 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2404 Enables or disables the use of the <c-def>TCP_NODELAY</c-def> option.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2405 The option is enabled only when a connection is transitioned into the
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2406 keep-alive state.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2407 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2408
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2409 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2410
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2411
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2412 <directive name="tcp_nopush">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2413 <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
2414 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2415 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2416 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2417 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2418
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2419 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2420 Enables or disables the use of
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2421 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
2422 or the <c-def>TCP_CORK</c-def> socket option on Linux.
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
2423 Options are enabled only when <link id="sendfile"/> is used.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2424 Enabling the option allows to
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2425 <list type="bullet">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2426
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2427 <listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2428 send the response header and the beginning of a file in one packet,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2429 on Linux and FreeBSD&nbsp;4.*;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2430 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2431
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2432 <listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2433 send a file in full packets.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2434 </listitem>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2435
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2436 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2437 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2438
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2439 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2440
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2441
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2442 <directive name="try_files">
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
2443 <syntax><value>file</value> ... <value>uri</value></syntax>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
2444 <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
2445 <default/>
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2446 <context>server</context>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2447 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2448
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2449 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2450 Checks the existence of files in the specified order, and uses
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2451 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
2452 is performed in the current context.
174
69c131b0ebe0 Rephrased a sentence about "try_files" so that "alias" isn't called a prefix.
Ruslan Ermilov <ru@nginx.com>
parents: 173
diff changeset
2453 A path to the file is constructed from the
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2454 <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
2455 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
2456 <link id="root"/> and <link id="alias"/> directives.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2457 It is possible to check the directory existence by specifying
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2458 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
2459 If none of the files were found, an internal redirect to the
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2460 <value>uri</value> specified by the last parameter is made.
173
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2461 For example:
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2462 <example>
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2463 location /images/ {
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2464 try_files $uri /images/default.gif;
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2465 }
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2466
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2467 location = /images/default.gif {
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2468 expires 30s;
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2469 }
6b81a1950ecb Improved on "try_files" documentation:
Ruslan Ermilov <ru@nginx.com>
parents: 172
diff changeset
2470 </example>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2471 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
2472 as shown in examples below.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2473 As of version 0.7.51, the last parameter can also be a
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2474 <value>code</value>:
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2475 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2476 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2477 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
2478 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2479 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2480 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2481
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 Example when proxying Mongrel:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2484 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2485 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2486 try_files /system/maintenance.html
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2487 $uri $uri/index.html $uri.html
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2488 @mongrel;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2489 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2490
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2491 location @mongrel {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2492 proxy_pass http://mongrel;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2493 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2494 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2495 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2496
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 Example for Drupal/FastCGI:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2499 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2500 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2501 try_files $uri $uri/ @drupal;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2502 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2503
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2504 location ~ \.php$ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2505 try_files $uri @drupal;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2506
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2507 fastcgi_pass ...;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2508
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2509 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
2510 fastcgi_param SCRIPT_NAME $fastcgi_script_name;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2511 fastcgi_param QUERY_STRING $args;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2512
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2513 ... other fastcgi_param's
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
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2516 location @drupal {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2517 fastcgi_pass ...;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2518
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2519 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
2520 fastcgi_param SCRIPT_NAME /index.php;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2521 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
2522
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2523 ... other fastcgi_param's
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 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2526 In the following example,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2527 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2528 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2529 try_files $uri $uri/ @drupal;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2530 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2531 </example>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2532 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
2533 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2534 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2535 error_page 404 = @drupal;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2536 log_not_found off;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2537 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2538 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2539 And here,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2540 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2541 location ~ \.php$ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2542 try_files $uri @drupal;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2543
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2544 fastcgi_pass ...;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2545
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2546 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
2547
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2548 ...
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 </example>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2551 <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
2552 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
2553 </para>
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 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2556 Example for Wordpress and Joomla:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2557 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2558 location / {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2559 try_files $uri $uri/ @wordpress;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2560 }
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 location ~ \.php$ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2563 try_files $uri @wordpress;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2564
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2565 fastcgi_pass ...;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2566
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2567 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
2568 ... other fastcgi_param's
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2569 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2570
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2571 location @wordpress {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2572 fastcgi_pass ...;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2573
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2574 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
2575 ... other fastcgi_param's
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2576 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2577 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2578 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2579
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2580 </directive>
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
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2583 <directive name="types">
108
72524ae53106 Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents: 106
diff changeset
2584 <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
2585 <default>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2586 text/html html;
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2587 image/gif gif;
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2588 image/jpeg jpg;
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
2589 </default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2590 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2591 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2592 <context>location</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2593
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2594 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2595 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
2596 Extensions are case-insensitive.
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2597 Several extensions can map to one type, for example:
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2598 <example>
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2599 types {
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2600 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
2601 application/octet-stream deb;
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2602 application/octet-stream dmg;
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2603 }
0b65e87daa8a Documented that filename extensions that map to MIME types are
Ruslan Ermilov <ru@nginx.com>
parents: 159
diff changeset
2604 </example>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2605 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2606
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2607 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2608 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
2609 <path>conf/mime.types</path> file.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2610 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2611
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2612 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2613 To make a particular location emit the
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2614 “<literal>application/octet-stream</literal>”
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2615 MIME type for all requests, try the following:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2616 <example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2617 location /download/ {
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2618 types { }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2619 default_type application/octet-stream;
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2620 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2621 </example>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2622 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2623
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2624 </directive>
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
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2627 <directive name="types_hash_bucket_size">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2628 <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
2629 <default>32|64|128</default>
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2630 <context>http</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2631 <context>server</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2632 <context>location</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2633
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2634 <para>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2635 Sets the bucket size for the types hash tables.
625
af3f38e349eb Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents: 617
diff changeset
2636 Default value depends on the size of the processor’s cache line.
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2637 Details of setting up hash tables are provided in a separate
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2638 <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
2639 </para>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2640
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2641 </directive>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2642
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2643
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2644 <directive name="types_hash_max_size">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2645 <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
2646 <default>1024</default>
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2647 <context>http</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2648 <context>server</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2649 <context>location</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2650
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2651 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2652 Sets the maximum <value>size</value> of the types hash tables.
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2653 Details of setting up hash tables are provided in a separate
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2654 <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
2655 </para>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2656
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2657 </directive>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2658
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2659
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2660 <directive name="underscores_in_headers">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2661 <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
2662 <default>off</default>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2663 <context>http</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2664 <context>server</context>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2665
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2666 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2667 Enables or disables the use of underscores in client request header fields.
225
46ef98b7513f Expanded on the "underscores_in_headers" relation to "ignore_invalid_headers".
Ruslan Ermilov <ru@nginx.com>
parents: 223
diff changeset
2668 When disabled, request header fields whose names contain underscores are
46ef98b7513f Expanded on the "underscores_in_headers" relation to "ignore_invalid_headers".
Ruslan Ermilov <ru@nginx.com>
parents: 223
diff changeset
2669 marked as invalid and are subject to the <link id="ignore_invalid_headers"/>
46ef98b7513f Expanded on the "underscores_in_headers" relation to "ignore_invalid_headers".
Ruslan Ermilov <ru@nginx.com>
parents: 223
diff changeset
2670 directive.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2671 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2672
426
1d6dc85ed324 Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents: 419
diff changeset
2673 <para>
442
b423d725a932 Try to emphasize that "underscores_in_headers" and "merge_slashes",
Ruslan Ermilov <ru@nginx.com>
parents: 438
diff changeset
2674 A directive can be specified on the <link id="server"/> level
b423d725a932 Try to emphasize that "underscores_in_headers" and "merge_slashes",
Ruslan Ermilov <ru@nginx.com>
parents: 438
diff changeset
2675 in a default server.
b423d725a932 Try to emphasize that "underscores_in_headers" and "merge_slashes",
Ruslan Ermilov <ru@nginx.com>
parents: 438
diff changeset
2676 In this case, its value will cover all virtual servers
b423d725a932 Try to emphasize that "underscores_in_headers" and "merge_slashes",
Ruslan Ermilov <ru@nginx.com>
parents: 438
diff changeset
2677 listening on the same address and port.
426
1d6dc85ed324 Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents: 419
diff changeset
2678 </para>
1d6dc85ed324 Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents: 419
diff changeset
2679
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2680 </directive>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2681
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2682
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2683 <directive name="variables_hash_bucket_size">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2684 <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
2685 <default>64</default>
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2686 <context>http</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2687
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2688 <para>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2689 Sets the bucket size for the variables hash table.
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2690 Details of setting up hash tables are provided in a separate
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2691 <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
2692 </para>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2693
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2694 </directive>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2695
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2696
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2697 <directive name="variables_hash_max_size">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2698 <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
2699 <default>512</default>
72
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2700 <context>http</context>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2701
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2702 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2703 Sets the maximum <value>size</value> of the variables hash table.
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2704 Details of setting up hash tables are provided in a separate
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 651
diff changeset
2705 <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
2706 </para>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2707
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2708 </directive>
0987079ad08f - "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents: 70
diff changeset
2709
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2710 </section>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2711
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 318
diff changeset
2712
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2713 <section id="variables" name="Embedded Variables">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2714
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2715 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2716 The module <literal>ngx_http_core_module</literal> supports embedded variables
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2717 with names matching those of the Apache Server.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2718 First of all, these are variables representing client request header
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 72
diff changeset
2719 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
2720 and so on.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2721 It also supports other variables:
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2722 <list type="tag">
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2723
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2724 <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
2725 <tag-desc>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2726 argument <value>name</value> in the request line
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2727 </tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2728
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2729 <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
2730 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2731 arguments in the request line
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2732 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2733
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2734 <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
2735 <tag-desc>
625
af3f38e349eb Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents: 617
diff changeset
2736 client address in a binary form, value’s length is always 4 bytes
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2737 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2738
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2739 <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
2740 <tag-desc>
769
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
2741 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
2742 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
2743 <literal>mod_log_config</literal>
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
2744 Apache module
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
2745 </tag-desc>
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
2746
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
2747 <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
2748 <tag-desc>
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
2749 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
2750 </tag-desc>
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
2751
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
2752 <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
2753 <tag-desc>
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
2754 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
2755 </tag-desc>
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
2756
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
2757 <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
2758 <tag-desc>
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
2759 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
2760 </tag-desc>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2761
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2762 <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
2763 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2764 <header>Content-Length</header> request header field
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2765 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2766
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2767 <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
2768 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2769 <header>Content-Type</header> request header field
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2770 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2771
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2772 <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
2773 <tag-desc>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2774 the <value>name</value> cookie
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2775 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2776
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2777 <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
2778 <tag-desc>
625
af3f38e349eb Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents: 617
diff changeset
2779 <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
2780 for the current request
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2781 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2782
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2783 <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
2784 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2785 same as <var>$uri</var>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2786 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2787
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2788 <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
2789 <tag-desc>
940
ded8f4a5de28 Corrected description of the $host variable.
Ruslan Ermilov <ru@nginx.com>
parents: 914
diff changeset
2790 in this order of precedence:
ded8f4a5de28 Corrected description of the $host variable.
Ruslan Ermilov <ru@nginx.com>
parents: 914
diff changeset
2791 host name from the request line, or
ded8f4a5de28 Corrected description of the $host variable.
Ruslan Ermilov <ru@nginx.com>
parents: 914
diff changeset
2792 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
2793 the server name matching a request
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2794 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2795
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2796 <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
2797 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2798 host name
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2799 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2800
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2801 <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
2802 <tag-desc>
448
92672f6f0ee1 Elaborated on $http_* and $sent_http_* syntax.
Ruslan Ermilov <ru@nginx.com>
parents: 442
diff changeset
2803 arbitrary request header field;
92672f6f0ee1 Elaborated on $http_* and $sent_http_* syntax.
Ruslan Ermilov <ru@nginx.com>
parents: 442
diff changeset
2804 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
2805 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
2806 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2807
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2808 <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
2809 <tag-desc>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2810 “<literal>on</literal>”
234
ad26f0ae970f Documented the $https variable.
Ruslan Ermilov <ru@nginx.com>
parents: 225
diff changeset
2811 if connection operates in SSL mode,
ad26f0ae970f Documented the $https variable.
Ruslan Ermilov <ru@nginx.com>
parents: 225
diff changeset
2812 or an empty string otherwise
ad26f0ae970f Documented the $https variable.
Ruslan Ermilov <ru@nginx.com>
parents: 225
diff changeset
2813 </tag-desc>
ad26f0ae970f Documented the $https variable.
Ruslan Ermilov <ru@nginx.com>
parents: 225
diff changeset
2814
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2815 <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
2816 <tag-desc>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2817 “<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
2818 or an empty string otherwise
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2819 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2820
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2821 <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
2822 <tag-desc>
767
1bb8b733416a Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents: 747
diff changeset
2823 setting this variable allows for response rate limiting;
1bb8b733416a Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents: 747
diff changeset
2824 see <link id="limit_rate"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2825 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2826
771
47ad88faaa3f $msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents: 769
diff changeset
2827 <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
2828 <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
2829 current time in seconds with a 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
2830 </tag-desc>
47ad88faaa3f $msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents: 769
diff changeset
2831
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2832 <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
2833 <tag-desc>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2834 nginx version
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2835 </tag-desc>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2836
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2837 <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
2838 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2839 PID of the worker process
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2840 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2841
826
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
2842 <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
2843 <tag-desc>
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
2844 “<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
2845 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
2846 </tag-desc>
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
2847
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2848 <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
2849 <tag-desc>
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2850 same as <var>$args</var>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2851 </tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2852
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2853 <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
2854 <tag-desc>
436
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
2855 an absolute pathname corresponding to the
625
af3f38e349eb Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents: 617
diff changeset
2856 <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
2857 for the current request,
3a9f39341c7c - Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents: 429
diff changeset
2858 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
2859 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2860
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2861 <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
2862 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2863 client address
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2864 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2865
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2866 <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
2867 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2868 client port
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2869 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2870
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2871 <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
2872 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2873 user name supplied with the Basic authentication
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2874 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2875
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2876 <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
2877 <tag-desc>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2878 full original request line
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2879 </tag-desc>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2880
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2881 <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
2882 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2883 request body
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2884 <para>
625
af3f38e349eb Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents: 617
diff changeset
2885 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
2886 processed by the
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
2887 <link doc="ngx_http_proxy_module.xml" id="proxy_pass"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2888 and
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
2889 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass"/>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2890 directives.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2891 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2892 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2893
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2894 <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
2895 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2896 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
2897 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2898 At the end of processing, the file needs to be removed.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2899 To always write a 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
2900 <link id="client_body_in_file_only"/> needs to be enabled.
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2901 When passing the name of a temporary file in a proxied request,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2902 or in a request to a FastCGI server,
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2903 passing of the request body should be disabled by the
246
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
2904 <link doc="ngx_http_proxy_module.xml" id="proxy_pass_request_body">
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
2905 proxy_pass_request_body off</link>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2906 and
246
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
2907 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass_request_body">
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
2908 fastcgi_pass_request_body off</link>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2909 directives, respectively.
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2910 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2911 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2912
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2913 <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
2914 <tag-desc>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2915 “<literal>OK</literal>” if a request has completed,
88
6876e2558d09 Spell checking.
Ruslan Ermilov <ru@nginx.com>
parents: 86
diff changeset
2916 or an empty string otherwise
6876e2558d09 Spell checking.
Ruslan Ermilov <ru@nginx.com>
parents: 86
diff changeset
2917 </tag-desc>
6876e2558d09 Spell checking.
Ruslan Ermilov <ru@nginx.com>
parents: 86
diff changeset
2918
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2919 <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
2920 <tag-desc>
530
d8c7160527ae query -> request
Ruslan Ermilov <ru@nginx.com>
parents: 527
diff changeset
2921 file path for the current request, based on the
246
6bfacf7124c6 Minor tweaks.
Ruslan Ermilov <ru@nginx.com>
parents: 244
diff changeset
2922 <link id="root"/> or <link id="alias"/>
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2923 directives, and the request URI
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2924 </tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2925
826
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
2926 <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
2927 <tag-desc>
840
9dab69f2b71d Documented nginx 1.2.7 changes.
Ruslan Ermilov <ru@nginx.com>
parents: 835
diff changeset
2928 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
2929 (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
2930 </tag-desc>
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
2931
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2932 <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
2933 <tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2934 request method, usually
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2935 “<literal>GET</literal>” or “<literal>POST</literal>”
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2936 </tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2937
771
47ad88faaa3f $msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents: 769
diff changeset
2938 <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
2939 <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
2940 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
2941 (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
2942 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
2943 </tag-desc>
47ad88faaa3f $msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents: 769
diff changeset
2944
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2945 <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
2946 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2947 full original request URI (with arguments)
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2948 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2949
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2950 <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
2951 <tag-desc>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2952 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
2953 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2954
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2955 <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
2956 <tag-desc>
448
92672f6f0ee1 Elaborated on $http_* and $sent_http_* syntax.
Ruslan Ermilov <ru@nginx.com>
parents: 442
diff changeset
2957 arbitrary response header field;
92672f6f0ee1 Elaborated on $http_* and $sent_http_* syntax.
Ruslan Ermilov <ru@nginx.com>
parents: 442
diff changeset
2958 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
2959 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
2960 </tag-desc>
341dc6392e8a Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents: 83
diff changeset
2961
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2962 <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
2963 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2964 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
2965 <para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2966 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
2967 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
2968 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
2969 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2970 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2971
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2972 <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
2973 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2974 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
2975 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2976
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2977 <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
2978 <tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2979 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
2980 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2981
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2982 <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
2983 <tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2984 request protocol, usually
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2985 “<literal>HTTP/1.0</literal>”
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2986 or
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
2987 “<literal>HTTP/1.1</literal>”
83
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2988 </tag-desc>
e8ed74d3fa0e Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
2989
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2990 <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
2991 <tag-desc>
769
d71e56d56ada Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents: 768
diff changeset
2992 response status (1.3.2, 1.2.2)
541
a8971cf346be Documented the $status core variable.
Andrey Belov <defan@nginx.com>
parents: 537
diff changeset
2993 </tag-desc>
a8971cf346be Documented the $status core variable.
Andrey Belov <defan@nginx.com>
parents: 537
diff changeset
2994
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
2995 <tag-name id="var_tcpinfo_">
453
98ee97a382d3 Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents: 448
diff changeset
2996 <var>$tcpinfo_rtt</var>,
98ee97a382d3 Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents: 448
diff changeset
2997 <var>$tcpinfo_rttvar</var>,
98ee97a382d3 Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents: 448
diff changeset
2998 <var>$tcpinfo_snd_cwnd</var>,
98ee97a382d3 Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents: 448
diff changeset
2999 <var>$tcpinfo_rcv_space</var>
98ee97a382d3 Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents: 448
diff changeset
3000 </tag-name>
98ee97a382d3 Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents: 448
diff changeset
3001 <tag-desc>
98ee97a382d3 Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents: 448
diff changeset
3002 information about the client TCP connection; available on systems
98ee97a382d3 Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents: 448
diff changeset
3003 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
3004 </tag-desc>
98ee97a382d3 Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents: 448
diff changeset
3005
826
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
3006 <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
3007 <tag-desc>
840
9dab69f2b71d Documented nginx 1.2.7 changes.
Ruslan Ermilov <ru@nginx.com>
parents: 835
diff changeset
3008 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
3009 </tag-desc>
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
3010
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
3011 <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
3012 <tag-desc>
840
9dab69f2b71d Documented nginx 1.2.7 changes.
Ruslan Ermilov <ru@nginx.com>
parents: 835
diff changeset
3013 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
3014 </tag-desc>
ddd22f571529 Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents: 810
diff changeset
3015
768
f63b7fa3bf17 Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents: 767
diff changeset
3016 <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
3017 <tag-desc>
503
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
3018 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
3019 <para>
503
aed015c3dedd Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents: 499
diff changeset
3020 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
3021 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
3022 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3023 </tag-desc>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3024
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3025 </list>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3026 </para>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3027
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3028 </section>
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3029
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3030 </module>