annotate docs/xml/http/ngx_http_core_module.xml @ 4141:a18b10aea510

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