annotate docs/xml/http/ngx_http_core_module.xml @ 4083:44c1953c266c

Cleaned up links.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 08 Sep 2011 13:27:18 +0000
parents 9755cb2a39b2
children 5e2103cffd80
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>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
156 If <command>alias</command> is used inside a location defined
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
158 contain captures and <command>alias</command> should refer to
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>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
205 method of the
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
206 <link doc="ngx_http_perl_module.xml">http_perl</link> module.
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,
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
303 the error
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
304 <http-error code="408" text="Request time out"/>
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,
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
340 the error
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
341 <http-error code="408" text="Request time out"/>
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.
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
360 If <argument>size</argument> is greater than the configured value, the
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
361 <http-error code="413" text="Request Entity Too Large"/>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
362 error is returned to a client.
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
4083
44c1953c266c Cleaned up links.
Ruslan Ermilov <ru@nginx.com>
parents: 4079
diff changeset
444 <command>error_page</command>
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.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
542 For external requests, the <http-error code="404" text="Not found"/>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
543 error is returned.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
544 Internal requests are the following:
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
545
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
546 <list type="bullet">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
547
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
548 <listitem>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
549 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
550 </listitem>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
551
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
552 <listitem>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
553 subrequests formed by the
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
554 <command>include virtual</command>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
555 command of the
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
556 <link doc="ngx_http_ssi_module.xml">http_ssi</link> module;
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
557 </listitem>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
558
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
559 <listitem>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
560 requests changed by the
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
561 <link doc="ngx_http_rewrite_module.xml" id="rewrite">rewrite</link>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
562 directive of the
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
563 <link doc="ngx_http_rewrite_module.xml">http_rewrite</link> module.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
564 </listitem>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
565
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
566 </list>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
567 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
568
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
569 <para>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
570 Example:
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
571 <example>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
572 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
573
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
574 location /404.html {
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
575 internal;
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
576 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
577 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
578 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
579
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
580 </directive>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
581
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 <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
584 <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
585 <default>keepalive_requests 100</default>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
586 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
587 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
588 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
589
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
590 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
591 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
592 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
593 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
594
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
595 </directive>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
596
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 <directive name="keepalive_timeout">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
599 <syntax>keepalive_timeout
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
600 <argument>time</argument>
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 </syntax>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
603 <default>keepalive_timeout 75</default>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
604 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
605 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
606 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
607
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
608 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
609 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
610 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
611 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
612 <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
613 response header.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
614 Two arguments may differ.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
615 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
616
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
617 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
618 The
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
619 <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
620 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
621 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
622 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
623
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
624 </directive>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
625
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 <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
628 <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
629 <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
630 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
631 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
632
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
633 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
634 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
635 buffers used when reading large client request headers.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
636 A request line cannot exceed the size of one buffer, or the
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
637 <http-error code="414" text="Request URI too large"/>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
638 error is returned.
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
639 A request header field cannot exceed the size of one buffer as well, or the
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
640 <http-error code="400" text="Bad request"/>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
641 error is returned.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
642 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
643 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
644 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
645 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
646 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
647 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
648
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
649 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
652 <directive name="limit_except">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
653 <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
654 <default/>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
655 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
656
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
657 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
658 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
659 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
660 Access to other methods can be limited using the
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
661 <link doc="ngx_http_access_module.xml">http_access</link>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
662 and
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
663 <link doc="ngx_http_auth_basic_module.xml">http_auth_basic</link>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
664 modules directives:
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
665 <example>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
666 limit_except GET {
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
667 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
668 deny all;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
669 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
670 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
671 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
672 <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
673 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
674
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
675 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
678 <directive name="limit_rate">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
679 <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
680 <default/>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
681 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
682 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
683 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
684 <context>if in location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
685
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
686 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
687 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
688 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
689 <!--
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
690 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
691 -->
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
692 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
693 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
694 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
695
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 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
698 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
699 <link id="server">server</link>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
700 level.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
701 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
702 <var>$limit_rate</var>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
703 variable:
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
704 <example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
705 server {
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
706
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
707 if ($slow) {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
708 set $limit_rate 4k;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
709 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
710
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 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
714 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
715
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
716 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
719 <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
720 <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
721 <default/>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
722 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
723 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
724 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
725 <context>if in location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
726
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
727 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
728 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
729 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
730 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
731
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 Example:
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
734 <example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
735 location /flv/ {
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
736 flv;
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
737 limit_rate_after 500k;
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
738 limit_rate 50k;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
739 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
740 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
741 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
742
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
743 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
746 <directive name="listen">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
747 <syntax>listen
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
748 <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
749 [<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
750 [<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
751 [<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
752 [<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
753 [<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
754 [<parameter>deferred</parameter>]
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
755 [<parameter>bind</parameter>]
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
756 [<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
757 [<parameter>ssl</parameter>]]
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
758 </syntax>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
759 <syntax>listen
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
760 <argument>port</argument>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
761 [<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
762 [<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
763 [<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
764 [<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
765 [<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
766 [<parameter>deferred</parameter>]
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
767 [<parameter>bind</parameter>]
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
768 [<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
769 [<parameter>ssl</parameter>]]
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
770 </syntax>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
771 <default>listen *:80 | *:8000</default>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
772 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
773
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
774 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
775 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
776 the server will accept requests.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
777 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
778 specified.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
779 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
780 <example>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
781 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
782 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
783 listen 8000;
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
784 listen *:8000;
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
785 listen localhost:8000;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
786 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
787 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
788 <example>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
789 listen [::]:8000;
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
790 listen [fe80::1];
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
791 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
792 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
793
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 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
796 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
797
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 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
800 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
801 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
802
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 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
805 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
806 <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
807 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
808 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
809 <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
810 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
811 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
812 <parameter>default_server</parameter>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
813 parameter.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
814 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
815
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 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
818 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
819 <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
820 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
821 <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
822 <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
823 <list type="tag">
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
824
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
825 <tag-name>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
826 <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
827 </tag-name>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
828 <tag-desc>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
829 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
830 <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
831 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
832 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
833 </tag-desc>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
834
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
835 <tag-name>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
836 <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
837 </tag-name>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
838 <tag-desc>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
839 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
840 </tag-desc>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
841
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
842 <tag-name>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
843 <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
844 </tag-name>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
845 <tag-desc>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
846 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
847 </tag-desc>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
848
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
849 <tag-name>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
850 <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
851 </tag-name>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
852 <tag-desc>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
853 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
854 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
855 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
856 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
857 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
858 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
859 </tag-desc>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
860
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
861 <tag-name>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
862 <parameter>deferred</parameter>
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 <tag-desc>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
865 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
866 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
867 </tag-desc>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
868
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
869 <tag-name>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
870 <parameter>bind</parameter>
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 <tag-desc>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
873 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
874 <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
875 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
876 <code>*</code>:<argument>port</argument>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
877 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
878 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
879 <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
880 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
881 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
882 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
883 connection.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
884 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
885 <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
886 <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
887 <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
888 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
889 </tag-desc>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
890
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
891 <tag-name>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
892 <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
893 </tag-name>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
894 <tag-desc>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
895 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
896 parameter for the listening socket.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
897 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
898 </tag-desc>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
899
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
900 <tag-name>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
901 <parameter>ssl</parameter>
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 <tag-desc>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
904 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
905 <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
906 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
907 the SSL mode.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
908 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
909 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
910 <example>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
911 listen 80;
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
912 listen 443 default ssl;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
913 </example>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
914 </tag-desc>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
915
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
916 </list>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
917 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
918
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 Example:
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
921 <example>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
922 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
923 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
924 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
925
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
926 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
929 <directive name="location">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
930 <syntax>location [
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
931 <value>=</value> |
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
932 <value>~</value> |
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 ] <argument>uri</argument>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
937 { ... }</syntax>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
938 <default/>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
939 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
940 <!--
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
941 <context>location</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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
944 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
945 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
946 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
947 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
948 <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
949 <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
950 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
951 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
952 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
953 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
954 in a configuration file.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
955 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
956 configuration is used.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
957 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
958 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
959 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
960
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 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
963 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
964 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
965 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
966
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 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
969 be used in other directives.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
970 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
971
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
972 <para>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
973 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
974 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
975 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
976
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
977 <para>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
978 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
979 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
980 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
981 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
982 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
983 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
984 comparison.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
985 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
986
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 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
989 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
990 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
991 not checked.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
992 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
993
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
994 <para>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
995 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
996 <example>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
997 location = / {
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
998 [ configuration A ]
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
999 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1000
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1001 location / {
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1002 [ configuration B ]
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1003 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1004
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1005 location ^~ /images/ {
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1006 [ configuration C ]
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1007 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1008
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1009 location ~* \.(gif|jpg|jpeg)$ {
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1010 [ configuration D ]
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1011 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1012 </example>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1013 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
1014 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
1015 configuration B,
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1016 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
1017 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
1018 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1019
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1020 <para>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1021 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
1022 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
1023 used for request redirection.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1024 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1025
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1026 <!--
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1027 <migration from="Apache" directive="Location" />
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1030 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1033 <directive name="log_not_found">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1034 <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
1035 <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
1036 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1037 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1038 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1039
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1040 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1041 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
1042 <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
1043 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1044
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1045 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1048 <directive name="log_subrequest">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1049 <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
1050 <default>log_subrequest off</default>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1051 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1052 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1053 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1054
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1055 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1056 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
1057 <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
1058 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1059
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1060 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1063 <directive name="merge_slashes">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1064 <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
1065 <default>merge_slashes on</default>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1066 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1067 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1069 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1070 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
1071 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
1072 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1073
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 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
1076 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
1077 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
1078 <example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1079 location /scripts/ {
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1080 ...
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1081 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1082 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1083 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
1084 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
1085 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1086
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 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
1089 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
1090 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
1091 the compression.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1092 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1093
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 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
1096 <link id="server">server</link>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1097 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
1098 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
1099 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1100
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1101 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1104 <directive name="msie_padding">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1105 <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
1106 <default>msie_padding on</default>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1107 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1108 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1109 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1110
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1111 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1112 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
1113 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
1114 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1115
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1116 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1119 <directive name="msie_refresh">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1120 <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
1121 <default>msie_refresh off</default>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1122 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1123 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1124 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1125
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1126 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1127 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
1128 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1129
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1130 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1133 <directive name="open_file_cache">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1134 <syntax>open_file_cache
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1135 <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
1136 [<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
1137 <value>off</value>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1138 </syntax>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1139 <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
1140 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1141 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1142 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1143
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1144 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1145 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
1146 <list type="bullet">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1147
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1148 <listitem>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1149 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
1150 </listitem>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1151
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 directory lookups;
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
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 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
1158 and so on.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1159 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
1160 <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
1161 directive.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1162 </listitem>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1163
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1164 </list>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1165 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1166
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 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
1169 <list type="tag">
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1170
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1171 <tag-name>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1172 <parameter>max</parameter>
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 <tag-desc>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1175 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
1176 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
1177 </tag-desc>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1178
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1179 <tag-name>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1180 <parameter>inactive</parameter>
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 <tag-desc>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1183 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
1184 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
1185 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
1186 </tag-desc>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1187
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1188 <tag-name>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1189 <value>off</value>
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 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1192 disables the cache.
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1193 </tag-desc>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1194
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1195 </list>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1196 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1197
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 Example:
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1200 <example>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1201 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
1202 open_file_cache_valid 30s;
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1203 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
1204 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
1205 <!--
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1206 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
1207 -->
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1208 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1209 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1210
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1211 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1214 <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
1215 <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
1216 <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
1217 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1218 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1219 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1220
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1221 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1222 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
1223 <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
1224 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1225
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1226 </directive>
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
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 <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
1232 <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
1233 <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
1234 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1235 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1236 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1237
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1238 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1239 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
1240 <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
1241 elements.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1242 This directive works with the
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1243 <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
1244 method only.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1245 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
1246 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
1247 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
1248 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
1249 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1250
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1251 </directive>
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 -->
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 <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
1257 <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
1258 <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
1259 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1260 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1261 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1262
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1263 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1264 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
1265 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
1266 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
1267 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
1268 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1269
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1270 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1273 <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
1274 <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
1275 <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
1276 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1277 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1278 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1279
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1280 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1281 Sets a time after which
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1282 <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
1283 elements should be validated.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1284 <!--
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1285 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
1286 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
1287 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
1288 -->
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1289 </para>
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 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1294 <directive name="optimize_server_names">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1295 <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
1296 <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
1297 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1298 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1299
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1300 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1301 This directive is obsolete.
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
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 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
1306 virtual servers.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1307 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
1308 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
1309 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
1310 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
1311 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
1312 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
1313 optimization needs to be disabled.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1314 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1315
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1316 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1319 <directive name="port_in_redirect">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1320 <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
1321 <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
1322 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1323 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1324 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1325
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1326 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1327 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
1328 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1329
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1330 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1333 <directive name="read_ahead">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1334 <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
1335 <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
1336 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1337 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1338 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1339
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1340 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1341 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
1342 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1343
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 On Linux, the
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1346 <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
1347 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
1348 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1349
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 On FreeBSD, the
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1352 <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
1353 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
1354 FreeBSD&nbsp;7 needs to be
4083
44c1953c266c Cleaned up links.
Ruslan Ermilov <ru@nginx.com>
parents: 4079
diff changeset
1355 <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
1356 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1357
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1358 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1361 <directive name="recursive_error_pages">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1362 <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
1363 <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
1364 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1365 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1366 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1367
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1368 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1369 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
1370 <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
1371 directive.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1372 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1373
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1374 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1377 <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
1378 <syntax>reset_timedout_connection
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1379 <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
1380 <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
1381 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1382 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1383 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1384
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1385 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1386 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
1387 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
1388 <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
1389 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
1390 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
1391 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
1392 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
1393 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
1394 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1395
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 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
1398 closed normally.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1399 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1400
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1401 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1404 <directive name="resolver">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1405 <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
1406 <default/>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1407 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1408 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1409 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1410
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1411 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1412 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
1413 <example>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1414 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
1415 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1416 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1417
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1418 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1421 <directive name="resolver_timeout">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1422 <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
1423 <default>resolver_timeout 30s</default>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1424 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1425 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1426 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1427
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1428 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1429 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
1430 <example>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1431 resolver_timeout 5s;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1432 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1433 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1434
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1435 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1438 <directive name="root">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1439 <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
1440 <default>root html</default>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1441 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1442 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1443 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1444 <context>if in location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1445
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1446 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1447 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
1448 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
1449 <example>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1450 location /i/ {
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1451 root /data/w3;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1452 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1453 </example>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1454 <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
1455 with the file
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1456 <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
1457 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1458
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 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
1461 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1462
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 A path to the file is constructed by merely adding a URI to the value
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1465 of the <command>root</command> directive.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1466 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
1467 <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
1468 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1469
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1470 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1473 <directive name="satisfy">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1474 <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
1475 <default>satisfy all</default>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1476 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1477
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1478 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1479 Allows access if any of the
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1480 <link doc="ngx_http_access_module.xml">http_access</link>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1481 or <link doc="ngx_http_auth_basic_module.xml">http_auth_basic</link>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1482 modules grant access.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1483 <example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1484 location / {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1485 satisfy any;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1486
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1487 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
1488 deny all;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1489
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1490 auth_basic "closed site";
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1491 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
1492 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1493 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1494 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1495
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1496 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1499 <directive name="satisfy_any">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1500 <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
1501 <default>satisfy_any off</default>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1502 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1503
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1504 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1505 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
1506 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1507
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1508 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1511 <directive name="send_timeout">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1512 <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
1513 <default>send_timeout 60</default>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1514 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1515 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1516 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1517
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1518 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1519 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
1520 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
1521 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
1522 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
1523 a connection is closed.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1524 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1525
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1526 </directive>
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
3996
fc808f006ff4 skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
1529 <directive name="sendfile">
fc808f006ff4 skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
1530
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1531 <syntax>sendfile <value>on</value> | <value>off</value></syntax>
3996
fc808f006ff4 skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
1532 <default>sendfile off</default>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1533 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1534 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1535 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1536
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1537 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1538 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
1539 <c-func>sendfile</c-func>.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1540 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1541
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1542 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1545 <directive name="server">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1546 <syntax>server { ... }</syntax>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1547 <default/>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1548 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1549
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1550 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1551 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
1552 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
1553 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
1554 virtual servers.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1555 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
1556 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
1557 <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
1558 An example configuration is provided in the
4083
44c1953c266c Cleaned up links.
Ruslan Ermilov <ru@nginx.com>
parents: 4079
diff changeset
1559 <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
1560 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
1561 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1562
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1563 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1566 <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
1567 <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
1568 <default>server_name hostname</default>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1569 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1570
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1571 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1572 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
1573 <example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1574 server {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1575 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
1576 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1577 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1578 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1579
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 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
1582 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
1583 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
1584 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
1585 <example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1586 server {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1587 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
1588 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1589 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1590 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1591
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 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
1594 <example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1595 server {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1596 server_name .example.com;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1597 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1598 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1599 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1600
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 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
1603 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
1604 <example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1605 server {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1606 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
1607 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1608 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1609 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1610
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 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
1613 be used in other directives:
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1614 <example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1615 server {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1616 server_name ~^(www\.)?(.+)$;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1617
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1618 location / {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1619 root /sites/$2;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1620 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1621 }
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 server {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1624 server_name _;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1625
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1626 location / {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1627 root /sites/default;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1628 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1629 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1630 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1631 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1632
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 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
1635 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
1636 <example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1637 server {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1638 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
1639
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1640 location / {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1641 root /sites/$domain;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1642 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1643 }
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 server {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1646 server_name _;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1647
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1648 location / {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1649 root /sites/default;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1650 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1651 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1652 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1653 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1654
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1655 <para>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1656 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
1657 <example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1658 server {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1659 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
1660 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1661 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1662 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
1663 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
1664 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1665
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 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
1668 <list type="enum">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1669
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1670 <listitem>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1671 full names
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1674 <listitem>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1675 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
1676 </listitem>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1677
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1678 <listitem>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1679 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
1680 </listitem>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1681
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 regular expressions
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1686 </list>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1687 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1688
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1689 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1692 <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
1693 <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
1694 <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
1695 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1696 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1697 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1698
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1699 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1700 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
1701 <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
1702 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
1703 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
1704 is used.
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1705 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
1706 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1707
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1708 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1711 <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
1712 <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
1713 <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
1714 <context>http</context>
3996
fc808f006ff4 skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
1715
fc808f006ff4 skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
1716 <para>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1717 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
1718 For more information, please refer to
4083
44c1953c266c Cleaned up links.
Ruslan Ermilov <ru@nginx.com>
parents: 4079
diff changeset
1719 <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
1720 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1721
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1722 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1725 <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
1726 <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
1727 <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
1728 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1729
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1730 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1731 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
1732 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
1733 For more information, please refer to
4083
44c1953c266c Cleaned up links.
Ruslan Ermilov <ru@nginx.com>
parents: 4079
diff changeset
1734 <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
1735 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1736
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1737 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1740 <directive name="server_tokens">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1741 <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
1742 <default>server_tokens on</default>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1743 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1744 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1745 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1746
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1747 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1748 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
1749 <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
1750 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1751
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1752 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1755 <directive name="tcp_nodelay">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1756 <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
1757 <default>tcp_nodelay on</default>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1758 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1759 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1760 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1761
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1762 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1763 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
1764 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
1765 keep-alive state.
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1766 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1767
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1768 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1771 <directive name="tcp_nopush">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1772 <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
1773 <default>tcp_nopush off</default>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1774 <context>http</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1775 <context>server</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1776 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1777
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1778 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1779 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
1780 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
1781 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
1782 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
1783 Enabling the option allows to
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1784 <list type="bullet">
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1785
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1786 <listitem>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1787 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
1788 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
1789 </listitem>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1790
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 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
1793 </listitem>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1794
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1795 </list>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1796 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1797
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1798 </directive>
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1801 <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
1802 <syntax>try_files
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1803 <argument>file</argument> ...
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1804 <argument>uri</argument>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1805 </syntax>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1806 <syntax>try_files
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1807 <argument>file</argument> ...
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1808 =<argument>code</argument>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1809 </syntax>
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1810 <default/>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1811 <context>location</context>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1812
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1813 <para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1814 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
1815 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
1816 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
1817 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
1818 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
1819 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
1820 <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
1821 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
1822 <argument>code</argument>:
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1823 <example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1824 location / {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1825 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
1826 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1827 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1828 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1829
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 Example when proxying Mongrel:
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1832 <example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1833 location / {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1834 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
1835 $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
1836 @mongrel;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1837 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1838
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1839 location @mongrel {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1840 proxy_pass http://mongrel;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1841 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1842 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1843 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1844
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 Example for Drupal/FastCGI:
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1847 <example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1848 location / {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1849 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
1850 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1851
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1852 location ~ \.php$ {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1853 try_files $uri @drupal;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1854
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1855 fastcgi_pass ...;
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_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
1858 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
1859 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
1860
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1861 ... other fastcgi_param's
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
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1864 location @drupal {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1865 fastcgi_pass ...;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1866
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1867 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
1868 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
1869 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
1870
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1871 ... other fastcgi_param's
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 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1874 In the following example,
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 location / {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1877 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
1878 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1879 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1880 the <command>try_files</command> directive is equivalent to
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1881 <example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1882 location / {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1883 error_page 404 = @drupal;
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1884 log_not_found off;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1885 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1886 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1887 And here,
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 location ~ \.php$ {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1890 try_files $uri @drupal;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1891
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1892 fastcgi_pass ...;
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_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
1895
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1896 ...
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 </example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1899 <command>try_files</command> checks the existence of the PHP file
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1900 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
1901 </para>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1902
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 Example for Wordpress and Joomla:
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1905 <example>
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1906 location / {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1907 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
1908 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1909
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1910 location ~ \.php$ {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1911 try_files $uri @wordpress;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1912
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1913 fastcgi_pass ...;
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_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
1916 ... other fastcgi_param's
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1917 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1918
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1919 location @wordpress {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1920 fastcgi_pass ...;
4068
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1921
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1922 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
1923 ... other fastcgi_param's
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1924 }
22364b1f61c9 Initial English translation of Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 3996
diff changeset
1925 </example>
3996
fc808f006ff4 skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
1926 </para>
fc808f006ff4 skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
1927
fc808f006ff4 skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
1928 </directive>
fc808f006ff4 skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
1929
4070
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1930
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1931 <directive name="types">
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1932 <syntax>types { ... }</syntax>
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1933 <default>see below</default>
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1934 <context>http</context>
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1935 <context>server</context>
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1936 <context>location</context>
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1937
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1938 <para>
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1939 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
1940 Several extensions can map to one type.
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1941 The following mappings are configured by default:
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1942 <example>
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1943 types {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1944 text/html html;
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1945 image/gif gif;
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1946 image/jpeg jpg;
4070
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1947 }
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1948 </example>
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1949 </para>
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1950
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 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
1953 <pathname>conf/mime.types</pathname> file.
4070
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1954 </para>
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1955
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1956 <para>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1957 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
1958 <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
1959 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
1960 <example>
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1961 location /download/ {
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1962 types { }
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1963 default_type application/octet-stream;
4070
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1964 }
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1965 </example>
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1966 </para>
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1967
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1968 </directive>
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
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1971 <directive name="underscores_in_headers">
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1972 <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
1973 <default>underscores_in_headers off</default>
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1974 <context>http</context>
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1975 <context>server</context>
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1976
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1977 <para>
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1978 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
1979 </para>
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1980
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1981 </directive>
d0d832a3b1df Translate "types" and "underscores_in_headers" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 4068
diff changeset
1982
3996
fc808f006ff4 skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
1983 </section>
fc808f006ff4 skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
1984
4079
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1985 <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
1986
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1987 <para>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1988 The http_core module supports embedded variables with names matching
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1989 those of the Apache Server.
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1990 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
1991 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
1992 and so on.
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1993 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
1994 <list type="tag">
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1995
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1996 <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
1997 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
1998 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
1999 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2000
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2001 <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
2002 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2003 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
2004 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2005
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2006 <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
2007 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2008 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
2009 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2010
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2011 <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
2012 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2013 <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
2014 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2015
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2016 <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
2017 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2018 <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
2019 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2020
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2021 <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
2022 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2023 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
2024 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2025
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2026 <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
2027 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2028 <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
2029 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2030
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2031 <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
2032 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2033 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
2034 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2035
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2036 <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
2037 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2038 <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
2039 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
2040 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2041
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2042 <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
2043 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2044 host 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
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2047 <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
2048 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2049 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
2050 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2051
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2052 <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
2053 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2054 <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
2055 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
2056 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2057
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2058 <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
2059 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2060 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
2061 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2062
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2063 <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
2064 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2065 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
2066 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2067
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2068 <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
2069 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2070 request method, usually
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2071 <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
2072 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2073
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2074 <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
2075 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2076 client address
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
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2079 <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
2080 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2081 client port
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
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2084 <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
2085 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2086 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
2087 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2088
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2089 <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
2090 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2091 <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
2092 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
2093 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2094
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2095 <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
2096 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2097 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
2098 <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
2099 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
2100 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2101
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2102 <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
2103 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2104 request body
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2105 <para>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2106 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
2107 processed by the
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2108 <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
2109 and
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_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
2111 directives.
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2112 </para>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2113 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2114
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2115 <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
2116 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2117 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
2118 <para>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2119 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
2120 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
2121 <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
2122 needs be specified.
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2123 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
2124 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
2125 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
2126 <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
2127 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
2128 and
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2129 <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
2130 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
2131 directives, respectively.
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2132 </para>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2133 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2134
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2135 <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
2136 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2137 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
2138 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2139
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2140 <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
2141 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2142 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
2143 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2144
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2145 <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
2146 <tag-desc>
4083
44c1953c266c Cleaned up links.
Ruslan Ermilov <ru@nginx.com>
parents: 4079
diff changeset
2147 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
2148 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2149
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2150 <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
2151 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2152 request protocol, usually
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2153 <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
2154 or
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.1</code></dq>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2156 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2157
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2158 <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
2159 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2160 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
2161 <para>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2162 Computing a value of this variable usually requires one system call.
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2163 To avoid a system call, the <command>listen</command> directives
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2164 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
2165 </para>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2166 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2167
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2168 <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
2169 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2170 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
2171 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2172
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2173 <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
2174 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2175 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
2176 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2177
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2178 <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
2179 <tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2180 current URI in request
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2181 <para>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2182 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
2183 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
2184 </para>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2185 </tag-desc>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2186
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2187 </list>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2188 </para>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2189
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2190 </section>
9755cb2a39b2 Finished initial translation of the Core and HTTP Core modules.
Ruslan Ermilov <ru@nginx.com>
parents: 4070
diff changeset
2191
3996
fc808f006ff4 skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
2192 </module>