annotate xml/en/docs/http/ngx_http_core_module.xml @ 159:8c124aef0041

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