Mercurial > hg > nginx-site
annotate xml/en/docs/http/ngx_http_core_module.xml @ 143:370cf5ccd3ca
The "resolver" directive now allows specifying multiple name servers.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 25 Oct 2011 11:07:56 +0000 |
parents | b9e5155d8f5d |
children | 8057b7793bd9 |
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 | 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 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 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 7. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
45 However, starting from FreeBSD 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—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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
50 <pathname>/var/log/messages</pathname> |
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 5.2.1 and nginx 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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
148 <dq><code>/i/top.gif</code></dq> will be responded |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
149 with the file |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
150 <dq><pathname>/data/w3/images/top.gif</pathname></dq>. |
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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
541 <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
|
542 <syntax/> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
543 <default/> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
544 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
545 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
546 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
547 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
|
548 For external requests, the client error |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
549 <http-status code="404" text="Not Found"/> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
550 is returned. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
551 Internal requests are the following: |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
552 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
553 <list type="bullet"> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
554 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
555 <listitem> |
106
56457a474903
If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
556 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
|
557 </listitem> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
558 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
559 <listitem> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
560 subrequests formed by the |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
561 <command>include virtual</command> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
562 command of the module |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
563 <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
|
564 </listitem> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
565 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
566 <listitem> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
567 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
|
568 <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
|
569 directive of the module |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
570 <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
|
571 </listitem> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
572 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
573 </list> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
574 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
575 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
576 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
577 Example: |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
578 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
579 error_page 404 /404.html; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
580 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
581 location /404.html { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
582 internal; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
583 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
584 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
585 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
586 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
587 </directive> |
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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
590 <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
|
591 <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
|
592 <default>100</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
593 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
594 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
595 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
596 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
597 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
598 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
|
599 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
|
600 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
|
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_timeout"> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
98
diff
changeset
|
607 <syntax> |
65
f122a777a6de
- Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents:
57
diff
changeset
|
608 <argument>timeout</argument> |
f122a777a6de
- Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents:
57
diff
changeset
|
609 [<argument>header_timeout</argument>] |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
610 </syntax> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
98
diff
changeset
|
611 <default>75s</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
612 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
613 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
614 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
615 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
616 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
617 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
|
618 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
|
619 The optional second argument sets a value in the |
140 | 620 <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
|
621 response header. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
622 Two arguments may differ. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
623 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
624 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
625 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
626 The |
140 | 627 <header>Keep-Alive: timeout=</header> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
628 is understood by Mozilla and Konqueror. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
629 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
|
630 </para> |
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 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
633 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
634 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
635 <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
|
636 <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
|
637 <default>4 8k</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
638 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
639 <context>server</context> |
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 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
|
643 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
|
644 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
|
645 <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
|
646 is returned. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
647 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
|
648 client error |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
649 <http-status code="400" text="Bad Request"/> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
650 is returned. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
651 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
|
652 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
|
653 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
|
654 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
|
655 </para> |
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 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
658 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
659 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
660 <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
|
661 <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
|
662 <default/> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
663 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
664 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
665 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
666 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
|
667 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
|
668 <value>GET</value>, |
f122a777a6de
- Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents:
57
diff
changeset
|
669 <value>HEAD</value>, |
f122a777a6de
- Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents:
57
diff
changeset
|
670 <value>POST</value>, |
f122a777a6de
- Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents:
57
diff
changeset
|
671 <value>PUT</value>, |
f122a777a6de
- Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents:
57
diff
changeset
|
672 <value>DELETE</value>, |
f122a777a6de
- Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents:
57
diff
changeset
|
673 <value>MKCOL</value>, |
f122a777a6de
- Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents:
57
diff
changeset
|
674 <value>COPY</value>, |
f122a777a6de
- Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents:
57
diff
changeset
|
675 <value>MOVE</value>, |
f122a777a6de
- Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents:
57
diff
changeset
|
676 <value>OPTIONS</value>, |
f122a777a6de
- Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents:
57
diff
changeset
|
677 <value>PROPFIND</value>, |
f122a777a6de
- Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents:
57
diff
changeset
|
678 <value>PROPPATCH</value>, |
f122a777a6de
- Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents:
57
diff
changeset
|
679 <value>LOCK</value>, |
f122a777a6de
- Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents:
57
diff
changeset
|
680 <value>UNLOCK</value>, |
f122a777a6de
- Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents:
57
diff
changeset
|
681 or |
f122a777a6de
- Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents:
57
diff
changeset
|
682 <value>PATCH</value>. |
f122a777a6de
- Use of $document_root and $realpath_root in "alias" is prohibited.
Ruslan Ermilov <ru@nginx.com>
parents:
57
diff
changeset
|
683 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
|
684 <value>HEAD</value> method. |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
685 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
|
686 <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
|
687 and |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
688 <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
|
689 modules directives: |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
690 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
691 limit_except GET { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
692 allow 192.168.1.0/32; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
693 deny all; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
694 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
695 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
696 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
|
697 <emphasis>except</emphasis> GET and HEAD. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
698 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
699 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
700 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
701 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
702 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
703 <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
|
704 <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
|
705 <default>0</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
706 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
707 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
708 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
709 <context>if in location</context> |
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 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
712 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
|
713 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
|
714 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
|
715 <!-- |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
716 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
|
717 --> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
718 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
|
719 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
|
720 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
721 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
722 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
723 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
|
724 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
|
725 <link id="server"/> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
726 level. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
727 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
|
728 <var>$limit_rate</var> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
729 variable: |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
730 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
731 server { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
732 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
733 if ($slow) { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
734 set $limit_rate 4k; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
735 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
736 |
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 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
739 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
740 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
741 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
742 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
743 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
744 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
745 <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
|
746 <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
|
747 <default>0</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
748 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
749 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
750 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
751 <context>if in location</context> |
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 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
754 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
|
755 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
|
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 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
759 Example: |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
760 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
761 location /flv/ { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
762 flv; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
763 limit_rate_after 500k; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
764 limit_rate 50k; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
765 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
766 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
767 </para> |
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 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
770 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
771 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
772 <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
|
773 <syntax> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
774 <argument>address</argument>[:<argument>port</argument>] |
66 | 775 [<parameter>default_server</parameter>] |
776 [<parameter>setfib</parameter>=<argument>number</argument>] | |
777 [<parameter>backlog</parameter>=<argument>number</argument>] | |
778 [<parameter>rcvbuf</parameter>=<argument>size</argument>] | |
779 [<parameter>sndbuf</parameter>=<argument>size</argument>] | |
780 [<parameter>accept_filter</parameter>=<argument>filter</argument>] | |
781 [<parameter>deferred</parameter>] | |
782 [<parameter>bind</parameter>] | |
783 [<parameter>ipv6only</parameter>=<value>on</value>|<value>off</value>] | |
784 [<parameter>ssl</parameter>] | |
785 </syntax> | |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
98
diff
changeset
|
786 <syntax> |
66 | 787 <argument>port</argument> |
788 [<parameter>default_server</parameter>] | |
789 [<parameter>setfib</parameter>=<argument>number</argument>] | |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
790 [<parameter>backlog</parameter>=<argument>number</argument>] |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
791 [<parameter>rcvbuf</parameter>=<argument>size</argument>] |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
792 [<parameter>sndbuf</parameter>=<argument>size</argument>] |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
793 [<parameter>accept_filter</parameter>=<argument>filter</argument>] |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
794 [<parameter>deferred</parameter>] |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
795 [<parameter>bind</parameter>] |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
796 [<parameter>ipv6only</parameter>=<value>on</value>|<value>off</value>] |
66 | 797 [<parameter>ssl</parameter>] |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
798 </syntax> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
98
diff
changeset
|
799 <syntax> |
66 | 800 <value>unix:</value><argument>path</argument> |
801 [<parameter>default_server</parameter>] | |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
802 [<parameter>backlog</parameter>=<argument>number</argument>] |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
803 [<parameter>rcvbuf</parameter>=<argument>size</argument>] |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
804 [<parameter>sndbuf</parameter>=<argument>size</argument>] |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
805 [<parameter>accept_filter</parameter>=<argument>filter</argument>] |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
806 [<parameter>deferred</parameter>] |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
807 [<parameter>bind</parameter>] |
66 | 808 [<parameter>ssl</parameter>] |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
809 </syntax> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
98
diff
changeset
|
810 <default>*:80 | *:8000</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
811 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
812 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
813 <para> |
66 | 814 Sets an <argument>address</argument> and a <argument>port</argument> for IP, |
815 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
|
816 the server will accept requests. |
66 | 817 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
|
818 specified. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
819 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
|
820 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
821 listen 127.0.0.1:8000; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
822 listen 127.0.0.1; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
823 listen 8000; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
824 listen *:8000; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
825 listen localhost:8000; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
826 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
827 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
|
828 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
829 listen [::]:8000; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
830 listen [fe80::1]; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
831 </example> |
66 | 832 UNIX-domain sockets (0.8.21) are specified with the “<code>unix:</code>” prefix: |
833 <example> | |
834 listen unix:/var/run/nginx.sock; | |
835 </example> | |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
836 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
837 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
838 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
839 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
|
840 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
841 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
842 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
843 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
|
844 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
|
845 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
846 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
847 <para> |
66 | 848 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
|
849 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
|
850 <argument>address</argument>:<argument>port</argument> pair. |
66 | 851 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
|
852 parameter then the first server with the |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
853 <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
|
854 the default server for this pair. |
66 | 855 <note> |
856 In versions prior to 0.8.21 this parameter is named simply | |
857 <parameter>default</parameter>. | |
858 </note> | |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
859 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
860 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
861 <para> |
66 | 862 A <code>listen</code> directive |
863 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
|
864 <c-func>listen</c-func> and <c-func>bind</c-func>. |
66 | 865 They can be specified in any |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
866 <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
|
867 <argument>address</argument>:<argument>port</argument> pair. |
66 | 868 <note> |
869 In versions prior to 0.8.21, they could only be | |
870 specified in the <code>listen</code> directive with the | |
871 <parameter>default</parameter> parameter. | |
872 </note> | |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
873 <list type="tag"> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
874 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
875 <tag-name> |
66 | 876 <parameter>setfib</parameter>=<argument>number</argument> |
877 </tag-name> | |
878 <tag-desc> | |
879 this parameter (0.8.44) sets the associated FIB (routing table) | |
880 for the listening socket. | |
881 This currently works only on FreeBSD. | |
882 </tag-desc> | |
883 | |
884 <tag-name> | |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
885 <parameter>backlog</parameter>=<argument>number</argument> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
886 </tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
887 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
888 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
|
889 <c-func>listen</c-func> call. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
890 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
|
891 and 511 on other platforms. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
892 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
893 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
894 <tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
895 <parameter>rcvbuf</parameter>=<argument>size</argument> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
896 </tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
897 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
898 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
|
899 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
900 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
901 <tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
902 <parameter>sndbuf</parameter>=<argument>size</argument> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
903 </tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
904 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
905 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
|
906 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
907 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
908 <tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
909 <parameter>accept_filter</parameter>=<argument>filter</argument> |
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 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
912 sets the name of the accept filter. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
913 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
|
914 and <value>httpready</value>. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
915 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
|
916 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
|
917 and 4.11-STABLE. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
918 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
919 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
920 <tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
921 <parameter>deferred</parameter> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
922 </tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
923 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
924 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
|
925 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
|
926 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
927 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
928 <tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
929 <parameter>bind</parameter> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
930 </tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
931 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
932 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
|
933 <argument>address</argument>:<argument>port</argument> pair. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
934 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
|
935 <code>*</code>:<argument>port</argument> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
936 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
|
937 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
|
938 <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
|
939 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
|
940 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
|
941 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
|
942 connection. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
943 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
|
944 <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
|
945 <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
|
946 <argument>address</argument>:<argument>port</argument> pair |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
947 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
|
948 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
949 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
950 <tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
951 <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
|
952 </tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
953 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
954 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
|
955 parameter for the listening socket. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
956 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
|
957 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
958 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
959 <tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
960 <parameter>ssl</parameter> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
961 </tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
962 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
963 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
|
964 <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
|
965 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
|
966 the SSL mode. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
967 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
|
968 in both HTTP and HTTPS modes simultaneously. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
969 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
970 listen 80; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
971 listen 443 default ssl; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
972 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
973 </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 </list> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
976 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
977 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
978 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
979 Example: |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
980 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
981 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
|
982 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
983 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
984 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
985 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
986 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
987 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
988 <directive name="location"> |
108
72524ae53106
Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents:
106
diff
changeset
|
989 <syntax block="yes">[ |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
990 <value>=</value> | |
98 | 991 <value>~</value> | |
992 <value>~*</value> | | |
993 <value>^~</value> | |
994 ] <argument>uri</argument> | |
108
72524ae53106
Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents:
106
diff
changeset
|
995 </syntax> |
72524ae53106
Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents:
106
diff
changeset
|
996 <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
|
997 <default/> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
998 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
999 <context>location</context> |
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 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1002 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
|
1003 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
|
1004 Regular expressions are specified by prepending them with the |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1005 <dq><value>~*</value></dq> prefix (for case-insensitive matching), or with the |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1006 <dq><value>~</value></dq> prefix (for case-sensitive matching). |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1007 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
|
1008 locations defined using the prefix strings (prefix locations). |
88 | 1009 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
|
1010 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
|
1011 in a configuration file. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1012 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
|
1013 configuration is used. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1014 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
|
1015 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
|
1016 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1017 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1018 <para> |
67
d98323a15ba4
Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents:
66
diff
changeset
|
1019 Locations can be nested, with some exceptions mentioned below. |
d98323a15ba4
Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents:
66
diff
changeset
|
1020 </para> |
d98323a15ba4
Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents:
66
diff
changeset
|
1021 |
d98323a15ba4
Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents:
66
diff
changeset
|
1022 <para> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1023 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
|
1024 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
|
1025 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
|
1026 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1027 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1028 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1029 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
|
1030 be used in other directives. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1031 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1032 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1033 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1034 If the most specific prefix location has the <dq><value>^~</value></dq> prefix |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1035 then regular expressions are not checked. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1036 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1037 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1038 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1039 Also, using the <dq><value>=</value></dq> prefix it is possible to define |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1040 an exact match of URI and location. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1041 If an exact match is found, the search terminates. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1042 For example, if a <dq><code>/</code></dq> request happens frequently, |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1043 defining <dq><code>location = /</code></dq> will speed up the processing |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1044 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
|
1045 comparison. |
67
d98323a15ba4
Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents:
66
diff
changeset
|
1046 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
|
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> |
67
d98323a15ba4
Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents:
66
diff
changeset
|
1050 <note> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1051 In versions from 0.7.1 to 0.8.41, if a request matched the prefix |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1052 location without the <dq><value>=</value></dq> and <dq><value>^~</value></dq> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1053 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
|
1054 not checked. |
67
d98323a15ba4
Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents:
66
diff
changeset
|
1055 </note> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1056 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1057 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1058 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1059 Let's illustrate the above by example: |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1060 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1061 location = / { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1062 [ configuration A ] |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1063 } |
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 location / { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1066 [ configuration B ] |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1067 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1068 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1069 location ^~ /images/ { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1070 [ configuration C ] |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1071 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1072 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1073 location ~* \.(gif|jpg|jpeg)$ { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1074 [ configuration D ] |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1075 } |
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 The <dq><code>/</code></dq> request will match configuration A, |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1078 the <dq><code>/documents/document.html</code></dq> request will match |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1079 configuration B, |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1080 the <dq><code>/images/1.gif</code></dq> request will match configuration C, and |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1081 the <dq><code>/documents/1.jpg</code></dq> request will match configuration D. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1082 </para> |
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 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1085 The <dq><value>@</value></dq> prefix defines a named location. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1086 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
|
1087 used for request redirection. |
67
d98323a15ba4
Documented the nested locations.
Ruslan Ermilov <ru@nginx.com>
parents:
66
diff
changeset
|
1088 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
|
1089 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1090 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1091 <!-- |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1092 <migration from="Apache" directive="Location" /> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1093 --> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1094 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1095 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1096 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1097 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1098 <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
|
1099 <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
|
1100 <default>on</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1101 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1102 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1103 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1104 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1105 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1106 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
|
1107 <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
|
1108 </para> |
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 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1111 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1112 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1113 <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
|
1114 <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
|
1115 <default>off</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1116 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1117 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1118 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1119 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1120 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1121 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
|
1122 <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
|
1123 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1124 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1125 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1126 |
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 <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
|
1129 <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
|
1130 <default>on</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1131 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1132 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1133 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1134 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1135 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
|
1136 in a URI into a single slash. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1137 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1138 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1139 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1140 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
|
1141 and regular expressions location matching. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1142 Without it, the <dq><code>//scripts/one.php</code></dq> request would not match |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1143 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1144 location /scripts/ { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1145 ... |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1146 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1147 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1148 and might be processed as a static file, |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1149 so it gets converted to <dq><code>/scripts/one.php</code></dq>. |
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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1152 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1153 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
|
1154 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
|
1155 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
|
1156 the compression. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1157 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1158 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1159 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1160 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
|
1161 <link id="server"/> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1162 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
|
1163 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
|
1164 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1165 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1166 </directive> |
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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1169 <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
|
1170 <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
|
1171 <default>on</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1172 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1173 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1174 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1175 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1176 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1177 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
|
1178 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
|
1179 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1180 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1181 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1182 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1183 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1184 <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
|
1185 <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
|
1186 <default>off</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1187 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1188 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1189 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1190 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1191 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1192 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
|
1193 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1194 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1195 </directive> |
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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1198 <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
|
1199 <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
|
1200 <syntax> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1201 <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
|
1202 [<parameter>inactive</parameter>=<argument>time</argument>] |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1203 </syntax> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
98
diff
changeset
|
1204 <default>off</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1205 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1206 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1207 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1208 |
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 Configures a cache that can store: |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1211 <list type="bullet"> |
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 <listitem> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1214 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
|
1215 </listitem> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1216 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1217 <listitem> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1218 directory lookups; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1219 </listitem> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1220 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1221 <listitem> |
68
9de85defbcf8
- "optimize_server_names" is deprecated in favour of "server_name_in_redirects"
Ruslan Ermilov <ru@nginx.com>
parents:
67
diff
changeset
|
1222 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
|
1223 and so on. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1224 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
|
1225 <link id="open_file_cache_errors"/> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1226 directive. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1227 </listitem> |
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 </list> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1230 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1231 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1232 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1233 The directive has the following parameters: |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1234 <list type="tag"> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1235 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1236 <tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1237 <parameter>max</parameter> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1238 </tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1239 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1240 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
|
1241 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
|
1242 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1243 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1244 <tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1245 <parameter>inactive</parameter> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1246 </tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1247 <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
|
1248 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
|
1249 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
|
1250 by default, it is 60 seconds; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1251 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1252 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1253 <tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1254 <value>off</value> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1255 </tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1256 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1257 disables the cache. |
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 </list> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1261 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1262 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1263 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1264 Example: |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1265 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1266 open_file_cache max=1000 inactive=20s; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1267 open_file_cache_valid 30s; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1268 open_file_cache_min_uses 2; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1269 open_file_cache_errors on; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1270 <!-- |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1271 open_file_cache_events on; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1272 --> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1273 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1274 </para> |
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 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1277 |
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 <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
|
1280 <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
|
1281 <default>off</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1282 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1283 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1284 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1285 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1286 <para> |
68
9de85defbcf8
- "optimize_server_names" is deprecated in favour of "server_name_in_redirects"
Ruslan Ermilov <ru@nginx.com>
parents:
67
diff
changeset
|
1287 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
|
1288 <link id="open_file_cache"/>. |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1289 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1290 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1291 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1292 |
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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1296 <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
|
1297 <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
|
1298 <default>off</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1299 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1300 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1301 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1302 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1303 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1304 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
|
1305 <link id="open_file_cache"/> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1306 elements. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1307 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
|
1308 <link doc="../events.xml" id="kqueue"/> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1309 method only. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1310 Note that only NetBSD 2.0+ and FreeBSD 6.0+ |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1311 support events for arbitrary file system types. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1312 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
|
1313 file systems such as UFS or FFS. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1314 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1315 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1316 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1317 |
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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1320 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1321 <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
|
1322 <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
|
1323 <default>1</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1324 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1325 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1326 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1327 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1328 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1329 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
|
1330 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
|
1331 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
|
1332 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
|
1333 </para> |
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 </directive> |
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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1338 <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
|
1339 <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
|
1340 <default>60s</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1341 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1342 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1343 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1344 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1345 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1346 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
|
1347 <link id="open_file_cache"/> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1348 elements should be validated. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1349 <!-- |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1350 When |
106
56457a474903
If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
1351 <link id="open_file_cache_events"/> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1352 is enabled, open file descriptors |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1353 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
|
1354 --> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1355 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1356 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1357 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1358 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1359 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1360 <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
|
1361 <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
|
1362 <default>off</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1363 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1364 <context>server</context> |
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 <para> |
68
9de85defbcf8
- "optimize_server_names" is deprecated in favour of "server_name_in_redirects"
Ruslan Ermilov <ru@nginx.com>
parents:
67
diff
changeset
|
1367 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
|
1368 <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
|
1369 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1370 |
68
9de85defbcf8
- "optimize_server_names" is deprecated in favour of "server_name_in_redirects"
Ruslan Ermilov <ru@nginx.com>
parents:
67
diff
changeset
|
1371 <!-- |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1372 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1373 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
|
1374 virtual servers. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1375 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
|
1376 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
|
1377 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
|
1378 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
|
1379 server name is used in redirects. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1380 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
|
1381 optimization needs to be disabled. |
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 --> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1384 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1385 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1386 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1387 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1388 <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
|
1389 <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
|
1390 <default>on</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1391 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1392 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1393 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1394 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1395 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1396 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
|
1397 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1398 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1399 </directive> |
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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1402 <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
|
1403 <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
|
1404 <default>0</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1405 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1406 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1407 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1408 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1409 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1410 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
|
1411 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1412 |
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 On Linux, the |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1415 <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
|
1416 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
|
1417 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1418 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1419 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1420 On FreeBSD, the |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1421 <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
|
1422 system call is used, supported in FreeBSD 9.0-CURRENT. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1423 FreeBSD 7 needs to be |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1424 <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
|
1425 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1426 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1427 </directive> |
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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1430 <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
|
1431 <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
|
1432 <default>off</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1433 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1434 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1435 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1436 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1437 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1438 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
|
1439 <link id="error_page"/> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1440 directive. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1441 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1442 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1443 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1444 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1445 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1446 <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
|
1447 <syntax> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1448 <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
|
1449 <default>off</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1450 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1451 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1452 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1453 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1454 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1455 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
|
1456 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
|
1457 <c-def>SO_LINGER</c-def> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1458 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
|
1459 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
|
1460 occupied by this socket is freed. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1461 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
|
1462 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
|
1463 </para> |
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 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1466 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
|
1467 closed normally. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1468 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1469 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1470 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1471 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1472 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1473 <directive name="resolver"> |
143
370cf5ccd3ca
The "resolver" directive now allows specifying multiple name servers.
Ruslan Ermilov <ru@nginx.com>
parents:
140
diff
changeset
|
1474 <syntax><argument>address</argument> ...</syntax> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1475 <default/> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1476 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1477 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1478 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1479 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1480 <para> |
143
370cf5ccd3ca
The "resolver" directive now allows specifying multiple name servers.
Ruslan Ermilov <ru@nginx.com>
parents:
140
diff
changeset
|
1481 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
|
1482 for example: |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1483 <example> |
143
370cf5ccd3ca
The "resolver" directive now allows specifying multiple name servers.
Ruslan Ermilov <ru@nginx.com>
parents:
140
diff
changeset
|
1484 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
|
1485 </example> |
143
370cf5ccd3ca
The "resolver" directive now allows specifying multiple name servers.
Ruslan Ermilov <ru@nginx.com>
parents:
140
diff
changeset
|
1486 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
|
1487 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
|
1488 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
|
1489 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
|
1490 <note> |
370cf5ccd3ca
The "resolver" directive now allows specifying multiple name servers.
Ruslan Ermilov <ru@nginx.com>
parents:
140
diff
changeset
|
1491 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
|
1492 </note> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1493 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1494 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1495 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1496 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1497 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1498 <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
|
1499 <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
|
1500 <default>30s</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1501 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1502 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1503 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1504 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1505 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1506 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
|
1507 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1508 resolver_timeout 5s; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1509 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1510 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1511 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1512 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1513 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1514 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1515 <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
|
1516 <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
|
1517 <default>html</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1518 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1519 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1520 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1521 <context>if in location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1522 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1523 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1524 Sets the root directory for requests. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1525 For example, with the following configuration |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1526 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1527 location /i/ { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1528 root /data/w3; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1529 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1530 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1531 <dq><code>/i/top.gif</code></dq> will be responded |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1532 with the file |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1533 <dq><pathname>/data/w3/i/top.gif</pathname></dq>. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1534 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1535 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1536 <para> |
69
935beaa561b3
- use of $document_root and $realpath_root in "root" is prohibited
Ruslan Ermilov <ru@nginx.com>
parents:
68
diff
changeset
|
1537 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
|
1538 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
|
1539 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1540 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1541 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1542 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
|
1543 of the <code>root</code> directive. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1544 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
|
1545 <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
|
1546 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1547 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1548 </directive> |
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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1551 <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
|
1552 <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
|
1553 <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
|
1554 <context>http</context> |
935beaa561b3
- use of $document_root and $realpath_root in "root" is prohibited
Ruslan Ermilov <ru@nginx.com>
parents:
68
diff
changeset
|
1555 <context>server</context> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1556 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1557 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1558 <para> |
69
935beaa561b3
- use of $document_root and $realpath_root in "root" is prohibited
Ruslan Ermilov <ru@nginx.com>
parents:
68
diff
changeset
|
1559 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
|
1560 <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
|
1561 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
|
1562 modules grant access. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1563 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1564 location / { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1565 satisfy any; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1566 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1567 allow 192.168.1.0/32; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1568 deny all; |
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 auth_basic "closed site"; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1571 auth_basic_user_file conf/htpasswd; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1572 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1573 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1574 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1575 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1576 </directive> |
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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1579 <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
|
1580 <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
|
1581 <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
|
1582 <context>http</context> |
935beaa561b3
- use of $document_root and $realpath_root in "root" is prohibited
Ruslan Ermilov <ru@nginx.com>
parents:
68
diff
changeset
|
1583 <context>server</context> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1584 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1585 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1586 <para> |
69
935beaa561b3
- use of $document_root and $realpath_root in "root" is prohibited
Ruslan Ermilov <ru@nginx.com>
parents:
68
diff
changeset
|
1587 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
|
1588 directive. |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1589 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1590 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1591 </directive> |
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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1594 <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
|
1595 <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
|
1596 <default>60s</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1597 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1598 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1599 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1600 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1601 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1602 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
|
1603 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
|
1604 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
|
1605 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
|
1606 a connection is closed. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1607 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1608 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1609 </directive> |
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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1612 <directive name="sendfile"> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1613 |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
98
diff
changeset
|
1614 <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
|
1615 <default>off</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1616 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1617 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1618 <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
|
1619 <context>if in location</context> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1620 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1621 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1622 Enables or disables the use of |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1623 <c-func>sendfile</c-func>. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1624 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1625 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1626 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1627 |
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 name="server"> |
108
72524ae53106
Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents:
106
diff
changeset
|
1630 <syntax block="yes"/> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1631 <default/> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1632 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1633 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1634 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1635 Sets a configuration for the virtual server. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1636 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
|
1637 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
|
1638 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
|
1639 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
|
1640 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
|
1641 <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
|
1642 An example configuration is provided in the |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1643 <link doc="../virtual_hosts.xml"> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1644 Setting Up Virtual Servers</link> document. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1645 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1646 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1647 </directive> |
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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1650 <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
|
1651 <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
|
1652 <default>""</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1653 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1654 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1655 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1656 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
|
1657 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1658 server { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1659 server_name example.com www.example.com; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1660 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1661 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1662 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1663 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1664 <para> |
70 | 1665 The first name becomes the primary server name. |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1666 Server names can include an asterisk (<dq><code>*</code></dq>) |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1667 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
|
1668 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1669 server { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1670 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
|
1671 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1672 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1673 </para> |
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 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
|
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; |
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 | 1685 If the argument equals “<var>$hostname</var>” (0.9.4), the |
1686 machine's hostname is substituted. | |
1687 </para> | |
1688 | |
1689 <para> | |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1690 It is also possible to use regular expressions in server names, |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1691 prepending the name with a tilde (<dq><code>~</code></dq>): |
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 server { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1694 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
|
1695 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1696 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1697 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1698 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1699 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1700 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
|
1701 be used in other directives: |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1702 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1703 server { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1704 server_name ~^(www\.)?(.+)$; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1705 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1706 location / { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1707 root /sites/$2; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1708 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1709 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1710 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1711 server { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1712 server_name _; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1713 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1714 location / { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1715 root /sites/default; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1716 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1717 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1718 </example> |
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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1721 <para> |
70 | 1722 Named captures in regular expressions create variables (0.8.25) |
1723 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
|
1724 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1725 server { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1726 server_name ~^(www\.)?(?<domain>.+)$; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1727 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1728 location / { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1729 root /sites/$domain; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1730 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1731 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1732 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1733 server { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1734 server_name _; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1735 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1736 location / { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1737 root /sites/default; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1738 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1739 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1740 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1741 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1742 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1743 <para> |
70 | 1744 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
|
1745 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1746 server { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1747 server_name www.example.com ""; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1748 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1749 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1750 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
|
1751 header, instead of the default server for the given address:port pair. |
70 | 1752 This is the default setting. |
1753 <note> | |
1754 Before 0.8.48, the machine's hostname was used by default. | |
1755 </note> | |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1756 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1757 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1758 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1759 The name checking order is as follows: |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1760 <list type="enum"> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1761 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1762 <listitem> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1763 full names |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1764 </listitem> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1765 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1766 <listitem> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1767 names with the prefix mask, e.g. <dq><code>*.example.com</code></dq> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1768 </listitem> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1769 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1770 <listitem> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1771 names with the suffix mask, e.g. <dq><code>mail.*</code></dq> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1772 </listitem> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1773 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1774 <listitem> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1775 regular expressions |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1776 </listitem> |
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 </list> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1779 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1780 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1781 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1782 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1783 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1784 <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
|
1785 <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
|
1786 <default>off</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1787 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1788 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1789 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1790 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1791 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1792 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
|
1793 <link id="server_name"/> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1794 directive, in redirects issued by nginx. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1795 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
|
1796 is used. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1797 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
|
1798 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1799 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1800 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1801 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1802 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1803 <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
|
1804 <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
|
1805 <default>32|64|128</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1806 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1807 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1808 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1809 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
|
1810 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
|
1811 For more information, please refer to |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1812 <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
|
1813 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1814 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1815 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1816 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1817 |
82
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
72
diff
changeset
|
1818 <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
|
1819 <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
|
1820 <default>512</default> |
82
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
72
diff
changeset
|
1821 <context>http</context> |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
72
diff
changeset
|
1822 |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
72
diff
changeset
|
1823 <para> |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
72
diff
changeset
|
1824 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
|
1825 For more information, please refer to |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
72
diff
changeset
|
1826 <link doc="../hash.xml">Setting Up Hashes</link>. |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
72
diff
changeset
|
1827 </para> |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
72
diff
changeset
|
1828 |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
72
diff
changeset
|
1829 </directive> |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
72
diff
changeset
|
1830 |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
72
diff
changeset
|
1831 |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1832 <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
|
1833 <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
|
1834 <default>on</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1835 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1836 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1837 <context>location</context> |
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 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1840 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
|
1841 <header>Server</header> response header field. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1842 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1843 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1844 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1845 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1846 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1847 <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
|
1848 <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
|
1849 <default>on</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1850 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1851 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1852 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1853 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1854 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1855 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
|
1856 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
|
1857 keep-alive state. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1858 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1859 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1860 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1861 |
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 <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
|
1864 <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
|
1865 <default>off</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1866 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1867 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1868 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1869 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1870 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1871 Enables or disables the use of |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1872 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
|
1873 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
|
1874 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
|
1875 Enabling the option allows to |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1876 <list type="bullet"> |
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 <listitem> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1879 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
|
1880 on Linux and FreeBSD 4.*; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1881 </listitem> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1882 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1883 <listitem> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1884 send a file in full packets. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1885 </listitem> |
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 </list> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1888 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1889 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1890 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1891 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1892 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1893 <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
|
1894 <syntax> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1895 <argument>file</argument> ... |
98 | 1896 <argument>uri</argument> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1897 </syntax> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
98
diff
changeset
|
1898 <syntax> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1899 <argument>file</argument> ... |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1900 =<argument>code</argument> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1901 </syntax> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1902 <default/> |
72
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
1903 <context>server</context> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1904 <context>location</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1905 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1906 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1907 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
|
1908 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
|
1909 is performed in the current context. |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1910 It is possible to check the directory existence by specifying |
72
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
1911 a slash at the end of a name, e.g. <dq><code>$uri/</code></dq>. |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1912 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
|
1913 <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
|
1914 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
|
1915 <argument>code</argument>: |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1916 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1917 location / { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1918 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
|
1919 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1920 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1921 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1922 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1923 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1924 Example when proxying Mongrel: |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1925 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1926 location / { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1927 try_files /system/maintenance.html |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1928 $uri $uri/index.html $uri.html |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1929 @mongrel; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1930 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1931 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1932 location @mongrel { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1933 proxy_pass http://mongrel; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1934 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1935 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1936 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1937 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1938 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1939 Example for Drupal/FastCGI: |
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/ @drupal; |
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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1945 location ~ \.php$ { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1946 try_files $uri @drupal; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1947 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1948 fastcgi_pass ...; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1949 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1950 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
|
1951 fastcgi_param SCRIPT_NAME $fastcgi_script_name; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1952 fastcgi_param QUERY_STRING $args; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1953 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1954 ... other fastcgi_param's |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1955 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1956 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1957 location @drupal { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1958 fastcgi_pass ...; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1959 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1960 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
|
1961 fastcgi_param SCRIPT_NAME /index.php; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1962 fastcgi_param QUERY_STRING q=$uri&$args; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1963 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1964 ... other fastcgi_param's |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1965 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1966 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1967 In the following example, |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1968 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1969 location / { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1970 try_files $uri $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 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1973 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
|
1974 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1975 location / { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1976 error_page 404 = @drupal; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1977 log_not_found off; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1978 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1979 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1980 And here, |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1981 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1982 location ~ \.php$ { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1983 try_files $uri @drupal; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1984 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1985 fastcgi_pass ...; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1986 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1987 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
|
1988 |
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 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1991 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1992 <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
|
1993 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
|
1994 </para> |
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 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1997 Example for Wordpress and Joomla: |
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 try_files $uri $uri/ @wordpress; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2001 } |
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 location ~ \.php$ { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2004 try_files $uri @wordpress; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2005 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2006 fastcgi_pass ...; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2007 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2008 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
|
2009 ... other fastcgi_param's |
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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2012 location @wordpress { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2013 fastcgi_pass ...; |
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 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
|
2016 ... other fastcgi_param's |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2017 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2018 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2019 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2020 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2021 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2022 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2023 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2024 <directive name="types"> |
108
72524ae53106
Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents:
106
diff
changeset
|
2025 <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
|
2026 <default> |
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
98
diff
changeset
|
2027 text/html html; |
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
98
diff
changeset
|
2028 image/gif gif; |
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
98
diff
changeset
|
2029 image/jpeg jpg; |
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
98
diff
changeset
|
2030 </default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2031 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2032 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2033 <context>location</context> |
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 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2036 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
|
2037 Several extensions can map to one type. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2038 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2039 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2040 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2041 A sufficiently full mapping table is distributed with nginx in the |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2042 <pathname>conf/mime.types</pathname> file. |
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 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2046 To make a particular location emit the |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2047 <dq><code>application/octet-stream</code></dq> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2048 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
|
2049 <example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2050 location /download/ { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2051 types { } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2052 default_type application/octet-stream; |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2053 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2054 </example> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2055 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2056 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2057 </directive> |
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 |
72
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2060 <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
|
2061 <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
|
2062 <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
|
2063 <context>http</context> |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2064 <context>server</context> |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2065 <context>location</context> |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2066 |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2067 <para> |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2068 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
|
2069 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
|
2070 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
|
2071 <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
|
2072 </para> |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2073 |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2074 </directive> |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2075 |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2076 |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2077 <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
|
2078 <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
|
2079 <default>1024</default> |
72
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2080 <context>http</context> |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2081 <context>server</context> |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2082 <context>location</context> |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2083 |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2084 <para> |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2085 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
|
2086 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
|
2087 <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
|
2088 </para> |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2089 |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2090 </directive> |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2091 |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2092 |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2093 <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
|
2094 <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
|
2095 <default>off</default> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2096 <context>http</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2097 <context>server</context> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2098 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2099 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2100 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
|
2101 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2102 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2103 </directive> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2104 |
72
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2105 |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2106 <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
|
2107 <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
|
2108 <default>64</default> |
72
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2109 <context>http</context> |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2110 |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2111 <para> |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2112 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
|
2113 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
|
2114 <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
|
2115 </para> |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2116 |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2117 </directive> |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2118 |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2119 |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2120 <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
|
2121 <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
|
2122 <default>512</default> |
72
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2123 <context>http</context> |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2124 |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2125 <para> |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2126 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
|
2127 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
|
2128 <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
|
2129 </para> |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2130 |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2131 </directive> |
0987079ad08f
- "try_files" can be specified in the "server" context,
Ruslan Ermilov <ru@nginx.com>
parents:
70
diff
changeset
|
2132 |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2133 </section> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2134 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2135 <section id="variables" name="Embedded Variables"> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2136 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2137 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2138 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
|
2139 names matching those of the Apache Server. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2140 First of all, these are variables representing client request header |
82
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
72
diff
changeset
|
2141 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
|
2142 and so on. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2143 It also supports other variables: |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2144 <list type="tag"> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2145 |
83
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2146 <tag-name><var>$arg_</var><argument>name</argument></tag-name> |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2147 <tag-desc> |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2148 argument <argument>name</argument> in the request line |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2149 </tag-desc> |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2150 |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2151 <tag-name><var>$args</var></tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2152 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2153 arguments in the request line |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2154 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2155 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2156 <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
|
2157 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2158 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
|
2159 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2160 |
86
341dc6392e8a
Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents:
83
diff
changeset
|
2161 <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
|
2162 <tag-desc> |
341dc6392e8a
Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents:
83
diff
changeset
|
2163 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
|
2164 </tag-desc> |
341dc6392e8a
Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents:
83
diff
changeset
|
2165 |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2166 <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
|
2167 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2168 <header>Content-Length</header> request header field |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2169 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2170 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2171 <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
|
2172 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2173 <header>Content-Type</header> request header field |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2174 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2175 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2176 <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
|
2177 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2178 the <argument>name</argument> cookie |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2179 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2180 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2181 <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
|
2182 <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
|
2183 <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
|
2184 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2185 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2186 <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
|
2187 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2188 same as <var>$uri</var> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2189 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2190 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2191 <tag-name><var>$host</var></tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2192 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2193 <header>Host</header> request header field, |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2194 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
|
2195 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2196 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2197 <tag-name><var>$hostname</var></tag-name> |
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 host name |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2200 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2201 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2202 <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
|
2203 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2204 the <argument>name</argument> request header field |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2205 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2206 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2207 <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
|
2208 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2209 <dq><code>?</code></dq> if a request line has arguments, |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2210 or an empty string otherwise |
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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2213 <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
|
2214 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2215 allows for connection rate limiting |
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 |
86
341dc6392e8a
Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents:
83
diff
changeset
|
2218 <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
|
2219 <tag-desc> |
341dc6392e8a
Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents:
83
diff
changeset
|
2220 nginx version |
341dc6392e8a
Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents:
83
diff
changeset
|
2221 </tag-desc> |
341dc6392e8a
Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents:
83
diff
changeset
|
2222 |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2223 <tag-name><var>$pid</var></tag-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 PID of the worker process |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2226 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2227 |
83
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2228 <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
|
2229 <tag-desc> |
83
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2230 same as <var>$args</var> |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2231 </tag-desc> |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2232 |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2233 <tag-name><var>$realpath_root</var></tag-name> |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2234 <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
|
2235 <link id="root"/> directive's value |
83
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2236 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
|
2237 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2238 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2239 <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
|
2240 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2241 client address |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2242 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2243 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2244 <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
|
2245 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2246 client port |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2247 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2248 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2249 <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
|
2250 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2251 user name supplied with the Basic authentication |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2252 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2253 |
86
341dc6392e8a
Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents:
83
diff
changeset
|
2254 <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
|
2255 <tag-desc> |
341dc6392e8a
Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents:
83
diff
changeset
|
2256 full original request line |
341dc6392e8a
Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents:
83
diff
changeset
|
2257 </tag-desc> |
341dc6392e8a
Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents:
83
diff
changeset
|
2258 |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2259 <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
|
2260 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2261 request body |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2262 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2263 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
|
2264 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
|
2265 <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
|
2266 and |
106
56457a474903
If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
2267 <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
|
2268 directives. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2269 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2270 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2271 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2272 <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
|
2273 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2274 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
|
2275 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2276 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
|
2277 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
|
2278 <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
|
2279 needs be specified. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2280 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
|
2281 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
|
2282 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
|
2283 <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
|
2284 and |
106
56457a474903
If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
2285 <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
|
2286 directives, respectively. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2287 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2288 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2289 |
88 | 2290 <tag-name><var>$request_completion</var></tag-name> |
2291 <tag-desc> | |
2292 <dq><code>OK</code></dq> if a request has completed, | |
2293 or an empty string otherwise | |
2294 </tag-desc> | |
2295 | |
83
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2296 <tag-name><var>$request_filename</var></tag-name> |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2297 <tag-desc> |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2298 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
|
2299 <link id="root"/> and <link id="alias"/> |
83
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2300 directives, and the request URI |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2301 </tag-desc> |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2302 |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2303 <tag-name><var>$request_method</var></tag-name> |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2304 <tag-desc> |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2305 request method, usually |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2306 <dq><code>GET</code></dq> or <dq><code>POST</code></dq> |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2307 </tag-desc> |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2308 |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2309 <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
|
2310 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2311 full original request URI (with arguments) |
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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2314 <tag-name><var>$scheme</var></tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2315 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2316 request scheme, <dq><code>http</code></dq> or <dq><code>https</code></dq> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2317 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2318 |
86
341dc6392e8a
Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents:
83
diff
changeset
|
2319 <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
|
2320 <tag-desc> |
341dc6392e8a
Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents:
83
diff
changeset
|
2321 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
|
2322 </tag-desc> |
341dc6392e8a
Documented $body_bytes_sent, $nginx_version, $request, and $sent_http_*.
Ruslan Ermilov <ru@nginx.com>
parents:
83
diff
changeset
|
2323 |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2324 <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
|
2325 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2326 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
|
2327 <para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2328 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
|
2329 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
|
2330 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
|
2331 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2332 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2333 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2334 <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
|
2335 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2336 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
|
2337 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2338 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2339 <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
|
2340 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2341 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
|
2342 </tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2343 |
83
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2344 <tag-name><var>$server_protocol</var></tag-name> |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2345 <tag-desc> |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2346 request protocol, usually |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2347 <dq><code>HTTP/1.0</code></dq> |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2348 or |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2349 <dq><code>HTTP/1.1</code></dq> |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2350 </tag-desc> |
e8ed74d3fa0e
Sorted variables alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
82
diff
changeset
|
2351 |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2352 <tag-name><var>$uri</var></tag-name> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2353 <tag-desc> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2354 current URI in request |
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 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
|
2357 or when using index files. |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2358 </para> |
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 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2361 </list> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2362 </para> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2363 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2364 </section> |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2365 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2366 </module> |