annotate xml/en/docs/http/ngx_http_scgi_module.xml @ 1748:be371be7a5c8

Documented optional port for proxy_bind and friends.
author Yaroslav Zhuravlev <yar@nginx.com>
date Mon, 20 Jun 2016 18:54:46 +0300
parents ae6bdb65ca7f
children 1d576e8d6ead
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1 <?xml version="1.0"?>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
2
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
3 <!--
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
4 Copyright (C) Igor Sysoev
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
5 Copyright (C) Nginx, Inc.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
6 -->
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
7
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
9
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
10 <module name="Module ngx_http_scgi_module"
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
11 link="/en/docs/http/ngx_http_scgi_module.html"
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
12 lang="en"
1748
be371be7a5c8 Documented optional port for proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1731
diff changeset
13 rev="24">
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
14
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
15 <section id="summary">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
16
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
17 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
18 The <literal>ngx_http_scgi_module</literal> module allows passing
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
19 requests to an SCGI server.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
20 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
21
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
22 </section>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
23
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
24
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
25 <section id="example" name="Example Configuration">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
26
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
27 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
28 <example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
29 location / {
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
30 include scgi_params;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
31 scgi_pass localhost:9000;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
32 }
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
33 </example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
34 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
35
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
36 </section>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
37
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
38
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
39 <section id="directives" name="Directives">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
40
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
41 <directive name="scgi_bind">
1696
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
42 <syntax><value>address</value> [transparent] | <literal>off</literal></syntax>
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
43 <default/>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
44 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
45 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
46 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
47
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
48 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
49 Makes outgoing connections to an SCGI server originate
1748
be371be7a5c8 Documented optional port for proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1731
diff changeset
50 from the specified local IP address with an optional port (1.11.2).
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
51 Parameter value can contain variables (1.3.12).
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
52 The special value <literal>off</literal> (1.3.12) cancels the effect
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
53 of the <literal>scgi_bind</literal> directive
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
54 inherited from the previous configuration level, which allows the
1748
be371be7a5c8 Documented optional port for proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1731
diff changeset
55 system to auto-assign the local IP address and port.
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
56 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
57
1696
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
58 <para id="scgi_bind_transparent">
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
59 The <literal>transparent</literal> parameter (1.11.0) allows
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
60 outgoing connections to an SCGI server originate
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
61 from a non-local IP address,
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
62 for example, from a real IP address of a client:
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
63 <example>
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
64 scgi_bind $remote_addr transparent;
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
65 </example>
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
66 In order for this parameter to work,
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
67 it is necessary to run nginx worker processes with the
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
68 <link doc="../ngx_core_module.xml" id="user">superuser</link> privileges
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
69 and configure kernel routing table
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
70 to intercept network traffic from the SCGI server.
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
71 </para>
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
72
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
73 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
74
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
75
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
76 <directive name="scgi_buffer_size">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
77 <syntax><value>size</value></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
78 <default>4k|8k</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
79 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
80 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
81 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
82
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
83 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
84 Sets the <value>size</value> of the buffer used for reading the first part
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
85 of the response received from the SCGI server.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
86 This part usually contains a small response header.
1550
305f2c338181 Fixed description of default value of proxy_buffer_size and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1542
diff changeset
87 By default, the buffer size is equal to one memory page.
305f2c338181 Fixed description of default value of proxy_buffer_size and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1542
diff changeset
88 This is either 4K or 8K, depending on a platform.
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
89 It can be made smaller, however.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
90 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
91
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
92 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
93
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
94
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
95 <directive name="scgi_buffering">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
96 <syntax><literal>on</literal> | <literal>off</literal></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
97 <default>on</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
98 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
99 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
100 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
101
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
102 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
103 Enables or disables buffering of responses from the SCGI server.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
104 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
105
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
106 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
107 When buffering is enabled, nginx receives a response from the SCGI server
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
108 as soon as possible, saving it into the buffers set by the
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
109 <link id="scgi_buffer_size"/> and <link id="scgi_buffers"/> directives.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
110 If the whole response does not fit into memory, a part of it can be saved
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
111 to a <link id="scgi_temp_path">temporary file</link> on the disk.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
112 Writing to temporary files is controlled by the
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
113 <link id="scgi_max_temp_file_size"/> and
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
114 <link id="scgi_temp_file_write_size"/> directives.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
115 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
116
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
117 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
118 When buffering is disabled, the response is passed to a client synchronously,
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
119 immediately as it is received.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
120 nginx will not try to read the whole response from the SCGI server.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
121 The maximum size of the data that nginx can receive from the server
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
122 at a time is set by the <link id="scgi_buffer_size"/> directive.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
123 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
124
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
125 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
126 Buffering can also be enabled or disabled by passing
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
127 “<literal>yes</literal>” or “<literal>no</literal>” in the
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
128 <header>X-Accel-Buffering</header> response header field.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
129 This capability can be disabled using the
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
130 <link id="scgi_ignore_headers"/> directive.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
131 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
132
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
133 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
134
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
135
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
136 <directive name="scgi_buffers">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
137 <syntax><value>number</value> <value>size</value></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
138 <default>8 4k|8k</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
139 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
140 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
141 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
142
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
143 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
144 Sets the <value>number</value> and <value>size</value> of the
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
145 buffers used for reading a response from the SCGI server,
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
146 for a single connection.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
147 By default, the buffer size is equal to one memory page.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
148 This is either 4K or 8K, depending on a platform.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
149 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
150
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
151 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
152
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
153
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
154 <directive name="scgi_busy_buffers_size">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
155 <syntax><value>size</value></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
156 <default>8k|16k</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
157 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
158 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
159 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
160
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
161 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
162 When <link id="scgi_buffering">buffering</link> of responses from the SCGI
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
163 server is enabled, limits the total <value>size</value> of buffers that
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
164 can be busy sending a response to the client while the response is not
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
165 yet fully read.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
166 In the meantime, the rest of the buffers can be used for reading the response
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
167 and, if needed, buffering part of the response to a temporary file.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
168 By default, <value>size</value> is limited by the size of two buffers set by the
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
169 <link id="scgi_buffer_size"/> and <link id="scgi_buffers"/> directives.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
170 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
171
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
172 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
173
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
174
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
175 <directive name="scgi_cache">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
176 <syntax><value>zone</value> | <literal>off</literal></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
177 <default>off</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
178 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
179 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
180 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
181
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
182 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
183 Defines a shared memory zone used for caching.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
184 The same zone can be used in several places.
1382
94cac978bda3 Documented variables support in proxy_cache and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1379
diff changeset
185 Parameter value can contain variables (1.7.9).
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
186 The <literal>off</literal> parameter disables caching inherited
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
187 from the previous configuration level.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
188 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
189
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
190 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
191
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
192
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
193 <directive name="scgi_cache_bypass">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
194 <syntax><value>string</value> ...</syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
195 <default/>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
196 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
197 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
198 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
199
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
200 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
201 Defines conditions under which the response will not be taken from a cache.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
202 If at least one value of the string parameters is not empty and is not
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
203 equal to “0” then the response will not be taken from the cache:
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
204 <example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
205 scgi_cache_bypass $cookie_nocache $arg_nocache$arg_comment;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
206 scgi_cache_bypass $http_pragma $http_authorization;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
207 </example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
208 Can be used along with the <link id="scgi_no_cache"/> directive.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
209 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
210
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
211 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
212
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
213
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
214 <directive name="scgi_cache_key">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
215 <syntax><value>string</value></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
216 <default/>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
217 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
218 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
219 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
220
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
221 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
222 Defines a key for caching, for example
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
223 <example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
224 scgi_cache_key localhost:9000$request_uri;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
225 </example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
226 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
227
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
228 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
229
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
230
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
231 <directive name="scgi_cache_lock">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
232 <syntax><literal>on</literal> | <literal>off</literal></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
233 <default>off</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
234 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
235 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
236 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
237 <appeared-in>1.1.12</appeared-in>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
238
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
239 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
240 When enabled, only one request at a time will be allowed to populate
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
241 a new cache element identified according to the <link id="scgi_cache_key"/>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
242 directive by passing a request to an SCGI server.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
243 Other requests of the same cache element will either wait
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
244 for a response to appear in the cache or the cache lock for
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
245 this element to be released, up to the time set by the
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
246 <link id="scgi_cache_lock_timeout"/> directive.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
247 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
248
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
249 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
250
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
251
1379
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
252 <directive name="scgi_cache_lock_age">
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
253 <syntax><value>time</value></syntax>
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
254 <default>5s</default>
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
255 <context>http</context>
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
256 <context>server</context>
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
257 <context>location</context>
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
258 <appeared-in>1.7.8</appeared-in>
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
259
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
260 <para>
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
261 If the last request passed to the SCGI server
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
262 for populating a new cache element
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
263 has not completed for the specified <value>time</value>,
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
264 one more request may be passed to the SCGI server.
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
265 </para>
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
266
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
267 </directive>
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
268
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
269
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
270 <directive name="scgi_cache_lock_timeout">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
271 <syntax><value>time</value></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
272 <default>5s</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
273 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
274 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
275 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
276 <appeared-in>1.1.12</appeared-in>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
277
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
278 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
279 Sets a timeout for <link id="scgi_cache_lock"/>.
1379
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
280 When the <value>time</value> expires,
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
281 the request will be passed to the SCGI server,
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
282 however, the response will not be cached.
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
283 <note>
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
284 Before 1.7.8, the response could be cached.
91f5c089f4ca Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents: 1353
diff changeset
285 </note>
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
286 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
287
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
288 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
289
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
290
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
291 <directive name="scgi_cache_methods">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
292 <syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
293 <literal>GET</literal> |
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
294 <literal>HEAD</literal> |
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
295 <literal>POST</literal>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
296 ...</syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
297 <default>GET HEAD</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
298 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
299 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
300 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
301
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
302 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
303 If the client request method is listed in this directive then
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
304 the response will be cached.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
305 “<literal>GET</literal>” and “<literal>HEAD</literal>” methods are always
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
306 added to the list, though it is recommended to specify them explicitly.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
307 See also the <link id="scgi_no_cache"/> directive.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
308 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
309
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
310 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
311
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
312
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
313 <directive name="scgi_cache_min_uses">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
314 <syntax><value>number</value></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
315 <default>1</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
316 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
317 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
318 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
319
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
320 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
321 Sets the <value>number</value> of requests after which the response
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
322 will be cached.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
323 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
324
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
325 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
326
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
327
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
328 <directive name="scgi_cache_path">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
329 <syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
330 <value>path</value>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
331 [<literal>levels</literal>=<value>levels</value>]
1384
66ee77849563 Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1382
diff changeset
332 [<literal>use_temp_path</literal>=<literal>on</literal>|<literal>off</literal>]
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
333 <literal>keys_zone</literal>=<value>name</value>:<value>size</value>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
334 [<literal>inactive</literal>=<value>time</value>]
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
335 [<literal>max_size</literal>=<value>size</value>]
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
336 [<literal>loader_files</literal>=<value>number</value>]
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
337 [<literal>loader_sleep</literal>=<value>time</value>]
1582
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
338 [<literal>loader_threshold</literal>=<value>time</value>]
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
339 [<literal>purger</literal>=<literal>on</literal>|<literal>off</literal>]
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
340 [<literal>purger_files</literal>=<value>number</value>]
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
341 [<literal>purger_sleep</literal>=<value>time</value>]
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
342 [<literal>purger_threshold</literal>=<value>time</value>]</syntax>
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
343 <default/>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
344 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
345
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
346 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
347 Sets the path and other parameters of a cache.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
348 Cache data are stored in files.
1190
dd4cfc6ce770 Corrected description of *_cache_path file names.
Ruslan Ermilov <ru@nginx.com>
parents: 1189
diff changeset
349 The file name in a cache is a result of
dd4cfc6ce770 Corrected description of *_cache_path file names.
Ruslan Ermilov <ru@nginx.com>
parents: 1189
diff changeset
350 applying the MD5 function to the
dd4cfc6ce770 Corrected description of *_cache_path file names.
Ruslan Ermilov <ru@nginx.com>
parents: 1189
diff changeset
351 <link id="scgi_cache_key">cache key</link>.
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
352 The <literal>levels</literal> parameter defines hierarchy levels of a cache.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
353 For example, in the following configuration
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
354 <example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
355 scgi_cache_path /data/nginx/cache levels=1:2 keys_zone=one:10m;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
356 </example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
357 file names in a cache will look like this:
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
358 <example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
359 /data/nginx/cache/<emphasis>c</emphasis>/<emphasis>29</emphasis>/b7f54b2df7773722d382f4809d650<emphasis>29c</emphasis>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
360 </example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
361 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
362
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
363 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
364 A cached response is first written to a temporary file,
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
365 and then the file is renamed.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
366 Starting from version 0.8.9, temporary files and the cache can be put on
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
367 different file systems.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
368 However, be aware that in this case a file is copied
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
369 across two file systems instead of the cheap renaming operation.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
370 It is thus recommended that for any given location both cache and a directory
1384
66ee77849563 Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1382
diff changeset
371 holding temporary files
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
372 are put on the same file system.
1384
66ee77849563 Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1382
diff changeset
373 A directory for temporary files is set based on
66ee77849563 Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1382
diff changeset
374 the <literal>use_temp_path</literal> parameter (1.7.10).
66ee77849563 Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1382
diff changeset
375 If this parameter is omitted or set to the value <literal>on</literal>,
66ee77849563 Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1382
diff changeset
376 the directory set by the <link id="scgi_temp_path"/> directive
66ee77849563 Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1382
diff changeset
377 for the given location will be used.
66ee77849563 Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1382
diff changeset
378 If the value is set to <literal>off</literal>,
66ee77849563 Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1382
diff changeset
379 temporary files will be put directly in the cache directory.
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
380 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
381
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
382 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
383 In addition, all active keys and information about data are stored
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
384 in a shared memory zone, whose <value>name</value> and <value>size</value>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
385 are configured by the <literal>keys_zone</literal> parameter.
1189
f25d00109de0 Documented cache keys_zone memory estimates.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1185
diff changeset
386 One megabyte zone can store about 8 thousand keys.
f25d00109de0 Documented cache keys_zone memory estimates.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1185
diff changeset
387 </para>
f25d00109de0 Documented cache keys_zone memory estimates.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1185
diff changeset
388
f25d00109de0 Documented cache keys_zone memory estimates.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1185
diff changeset
389 <para>
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
390 Cached data that are not accessed during the time specified by the
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
391 <literal>inactive</literal> parameter get removed from the cache
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
392 regardless of their freshness.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
393 By default, <literal>inactive</literal> is set to 10 minutes.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
394 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
395
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
396 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
397 The special “cache manager” process monitors the maximum cache size set
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
398 by the <literal>max_size</literal> parameter.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
399 When this size is exceeded, it removes the least recently used data.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
400 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
401
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
402 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
403 A minute after the start the special “cache loader” process is activated.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
404 It loads information about previously cached data stored on file system
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
405 into a cache zone.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
406 The loading is done in iterations.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
407 During one iteration no more than <literal>loader_files</literal> items
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
408 are loaded (by default, 100).
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
409 Besides, the duration of one iteration is limited by the
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
410 <literal>loader_threshold</literal> parameter (by default, 200 milliseconds).
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
411 Between iterations, a pause configured by the <literal>loader_sleep</literal>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
412 parameter (by default, 50 milliseconds) is made.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
413 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
414
1582
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
415 <para>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
416 Additionally,
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
417 the following parameters are available as part of our
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
418 <commercial_version>commercial subscription</commercial_version>:
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
419 </para>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
420
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
421 <para>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
422 <list type="tag">
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
423
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
424 <tag-name id="purger">
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
425 <literal>purger</literal>=<literal>on</literal>|<literal>off</literal>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
426 </tag-name>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
427 <tag-desc>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
428 Instructs whether cache entries that match a
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
429 <link id="scgi_cache_purge">wildcard key</link>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
430 will be removed from the disk by the cache purger (1.7.12).
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
431 Setting the parameter to <literal>on</literal>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
432 (default is <literal>off</literal>)
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
433 will activate the “cache purger” process that
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
434 permanently iterates through all cache entries
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
435 and deletes the entries that match the wildcard key.
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
436 </tag-desc>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
437
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
438 <tag-name id="purger_files">
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
439 <literal>purger_files</literal>=<value>number</value>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
440 </tag-name>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
441 <tag-desc>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
442 Sets the number of items that will be scanned during one iteration (1.7.12).
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
443 By default, <literal>purger_files</literal> is set to 10.
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
444 </tag-desc>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
445
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
446 <tag-name id="purger_threshold">
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
447 <literal>purger_threshold</literal>=<value>number</value>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
448 </tag-name>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
449 <tag-desc>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
450 Sets the duration of one iteration (1.7.12).
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
451 By default, <literal>purger_threshold</literal> is set to 50 milliseconds.
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
452 </tag-desc>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
453
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
454 <tag-name id="purger_sleep">
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
455 <literal>purger_sleep</literal>=<value>number</value>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
456 </tag-name>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
457 <tag-desc>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
458 Sets a pause between iterations (1.7.12).
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
459 By default, <literal>purger_sleep</literal> is set to 50 milliseconds.
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
460 </tag-desc>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
461
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
462 </list>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
463 </para>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
464
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
465 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
466
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
467
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
468 <directive name="scgi_cache_purge">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
469 <syntax>string ...</syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
470 <default/>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
471 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
472 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
473 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
474 <appeared-in>1.5.7</appeared-in>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
475
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
476 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
477 Defines conditions under which the request will be considered a cache
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
478 purge request.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
479 If at least one value of the string parameters is not empty and is not equal
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
480 to “0” then the cache entry with a corresponding
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
481 <link id="scgi_cache_key">cache key</link> is removed.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
482 The result of successful operation is indicated by returning
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
483 the <http-status code="204" text="No Content"/> response.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
484 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
485
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
486 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
487 If the <link id="scgi_cache_key">cache key</link> of a purge request ends
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
488 with an asterisk (“<literal>*</literal>”), all cache entries matching the
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
489 wildcard key will be removed from the cache.
1582
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
490 However, these entries will remain on the disk until they are deleted
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
491 for either <link id="scgi_cache_path">inactivity</link>,
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
492 or processed by the <link id="purger">cache purger</link> (1.7.12),
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
493 or a client attempts to access them.
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
494 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
495
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
496 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
497 Example configuration:
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
498 <example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
499 scgi_cache_path /data/nginx/cache keys_zone=cache_zone:10m;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
500
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
501 map $request_method $purge_method {
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
502 PURGE 1;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
503 default 0;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
504 }
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
505
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
506 server {
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
507 ...
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
508 location / {
1185
f9c8336fe43c Aligned configuration examples with fastcgi/scgi_cache_purge.
Ruslan Ermilov <ru@nginx.com>
parents: 1184
diff changeset
509 scgi_pass backend;
f9c8336fe43c Aligned configuration examples with fastcgi/scgi_cache_purge.
Ruslan Ermilov <ru@nginx.com>
parents: 1184
diff changeset
510 scgi_cache cache_zone;
f9c8336fe43c Aligned configuration examples with fastcgi/scgi_cache_purge.
Ruslan Ermilov <ru@nginx.com>
parents: 1184
diff changeset
511 scgi_cache_key $uri;
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
512 scgi_cache_purge $purge_method;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
513 }
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
514 }
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
515 </example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
516 <note>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
517 This functionality is available as part of our
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
518 <commercial_version>commercial subscription</commercial_version>.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
519 </note>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
520 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
521
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
522 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
523
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
524
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
525 <directive name="scgi_cache_revalidate">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
526 <syntax><literal>on</literal> | <literal>off</literal></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
527 <default>off</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
528 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
529 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
530 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
531 <appeared-in>1.5.7</appeared-in>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
532
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
533 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
534 Enables revalidation of expired cache items using conditional requests with
1246
5be7716a5684 Documented If-None-Match in proxy_cache_revalidate and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1190
diff changeset
535 the <header>If-Modified-Since</header> and <header>If-None-Match</header>
5be7716a5684 Documented If-None-Match in proxy_cache_revalidate and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1190
diff changeset
536 header fields.
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
537 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
538
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
539 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
540
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
541
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
542 <directive name="scgi_cache_use_stale">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
543 <syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
544 <literal>error</literal> |
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
545 <literal>timeout</literal> |
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
546 <literal>invalid_header</literal> |
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
547 <literal>updating</literal> |
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
548 <literal>http_500</literal> |
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
549 <literal>http_503</literal> |
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
550 <literal>http_403</literal> |
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
551 <literal>http_404</literal> |
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
552 <literal>off</literal>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
553 ...</syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
554 <default>off</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
555 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
556 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
557 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
558
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
559 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
560 Determines in which cases a stale cached response can be used
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
561 when an error occurs during communication with the SCGI server.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
562 The directive’s parameters match the parameters of the
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
563 <link id="scgi_next_upstream"/> directive.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
564 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
565
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
566 <para>
1542
a13a99cf46ea Better documented "*_cache_use_stale error".
Ruslan Ermilov <ru@nginx.com>
parents: 1524
diff changeset
567 The <literal>error</literal> parameter also permits
a13a99cf46ea Better documented "*_cache_use_stale error".
Ruslan Ermilov <ru@nginx.com>
parents: 1524
diff changeset
568 using a stale cached response if an SCGI server to process a request
a13a99cf46ea Better documented "*_cache_use_stale error".
Ruslan Ermilov <ru@nginx.com>
parents: 1524
diff changeset
569 cannot be selected.
a13a99cf46ea Better documented "*_cache_use_stale error".
Ruslan Ermilov <ru@nginx.com>
parents: 1524
diff changeset
570 </para>
a13a99cf46ea Better documented "*_cache_use_stale error".
Ruslan Ermilov <ru@nginx.com>
parents: 1524
diff changeset
571
a13a99cf46ea Better documented "*_cache_use_stale error".
Ruslan Ermilov <ru@nginx.com>
parents: 1524
diff changeset
572 <para>
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
573 Additionally, the <literal>updating</literal> parameter permits
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
574 using a stale cached response if it is currently being updated.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
575 This allows minimizing the number of accesses to SCGI servers
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
576 when updating cached data.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
577 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
578
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
579 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
580 To minimize the number of accesses to SCGI servers when
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
581 populating a new cache element, the <link id="scgi_cache_lock"/>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
582 directive can be used.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
583 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
584
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
585 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
586
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
587
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
588 <directive name="scgi_cache_valid">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
589 <syntax>[<value>code</value> ...] <value>time</value></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
590 <default/>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
591 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
592 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
593 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
594
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
595 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
596 Sets caching time for different response codes.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
597 For example, the following directives
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
598 <example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
599 scgi_cache_valid 200 302 10m;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
600 scgi_cache_valid 404 1m;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
601 </example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
602 set 10 minutes of caching for responses with codes 200 and 302
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
603 and 1 minute for responses with code 404.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
604 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
605
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
606 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
607 If only caching <value>time</value> is specified
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
608 <example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
609 scgi_cache_valid 5m;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
610 </example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
611 then only 200, 301, and 302 responses are cached.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
612 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
613
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
614 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
615 In addition, the <literal>any</literal> parameter can be specified
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
616 to cache any responses:
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
617 <example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
618 scgi_cache_valid 200 302 10m;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
619 scgi_cache_valid 301 1h;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
620 scgi_cache_valid any 1m;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
621 </example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
622 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
623
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
624 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
625 Parameters of caching can also be set directly
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
626 in the response header.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
627 This has higher priority than setting of caching time using the directive.
1349
97c8b146cb0e Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents: 1345
diff changeset
628 <list type="bullet" compact="no">
97c8b146cb0e Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents: 1345
diff changeset
629
97c8b146cb0e Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents: 1345
diff changeset
630 <listitem>
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
631 The <header>X-Accel-Expires</header> header field sets caching time of a
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
632 response in seconds.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
633 The zero value disables caching for a response.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
634 If the value starts with the <literal>@</literal> prefix, it sets an absolute
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
635 time in seconds since Epoch, up to which the response may be cached.
1349
97c8b146cb0e Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents: 1345
diff changeset
636 </listitem>
97c8b146cb0e Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents: 1345
diff changeset
637
97c8b146cb0e Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents: 1345
diff changeset
638 <listitem>
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
639 If the header does not include the <header>X-Accel-Expires</header> field,
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
640 parameters of caching may be set in the header fields
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
641 <header>Expires</header> or <header>Cache-Control</header>.
1349
97c8b146cb0e Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents: 1345
diff changeset
642 </listitem>
97c8b146cb0e Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents: 1345
diff changeset
643
97c8b146cb0e Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents: 1345
diff changeset
644 <listitem>
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
645 If the header includes the <header>Set-Cookie</header> field, such a
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
646 response will not be cached.
1349
97c8b146cb0e Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents: 1345
diff changeset
647 </listitem>
97c8b146cb0e Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents: 1345
diff changeset
648
1353
25db29c8875e Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents: 1352
diff changeset
649 <listitem>
25db29c8875e Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents: 1352
diff changeset
650 If the header includes the <header>Vary</header> field
25db29c8875e Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents: 1352
diff changeset
651 with the special value “<literal>*</literal>”, such a
25db29c8875e Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents: 1352
diff changeset
652 response will not be cached (1.7.7).
25db29c8875e Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents: 1352
diff changeset
653 If the header includes the <header>Vary</header> field
25db29c8875e Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents: 1352
diff changeset
654 with another value, such a response will be cached
25db29c8875e Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents: 1352
diff changeset
655 taking into account the corresponding request header fields (1.7.7).
25db29c8875e Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents: 1352
diff changeset
656 </listitem>
25db29c8875e Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents: 1352
diff changeset
657
1349
97c8b146cb0e Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents: 1345
diff changeset
658 </list>
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
659 Processing of one or more of these response header fields can be disabled
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
660 using the <link id="scgi_ignore_headers"/> directive.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
661 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
662
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
663 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
664
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
665
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
666 <directive name="scgi_connect_timeout">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
667 <syntax><value>time</value></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
668 <default>60s</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
669 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
670 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
671 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
672
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
673 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
674 Defines a timeout for establishing a connection with an SCGI server.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
675 It should be noted that this timeout cannot usually exceed 75 seconds.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
676 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
677
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
678 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
679
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
680
1337
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1290
diff changeset
681 <directive name="scgi_force_ranges">
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1290
diff changeset
682 <syntax><literal>on</literal> | <literal>off</literal></syntax>
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1290
diff changeset
683 <default>off</default>
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1290
diff changeset
684 <context>http</context>
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1290
diff changeset
685 <context>server</context>
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1290
diff changeset
686 <context>location</context>
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1290
diff changeset
687 <appeared-in>1.7.7</appeared-in>
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1290
diff changeset
688
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1290
diff changeset
689 <para>
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1290
diff changeset
690 Enables byte-range support
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1290
diff changeset
691 for both cached and uncached responses from the SCGI server
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1290
diff changeset
692 regardless of the <header>Accept-Ranges</header> field in these responses.
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1290
diff changeset
693 </para>
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1290
diff changeset
694
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1290
diff changeset
695 </directive>
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1290
diff changeset
696
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1290
diff changeset
697
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
698 <directive name="scgi_hide_header">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
699 <syntax><value>field</value></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
700 <default/>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
701 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
702 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
703 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
704
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
705 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
706 By default,
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
707 nginx does not pass the header fields <header>Status</header> and
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
708 <header>X-Accel-...</header> from the response of an SCGI
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
709 server to a client.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
710 The <literal>scgi_hide_header</literal> directive sets additional fields
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
711 that will not be passed.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
712 If, on the contrary, the passing of fields needs to be permitted,
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
713 the <link id="scgi_pass_header"/> directive can be used.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
714 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
715
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
716 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
717
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
718
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
719 <directive name="scgi_ignore_client_abort">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
720 <syntax><literal>on</literal> | <literal>off</literal></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
721 <default>off</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
722 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
723 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
724 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
725
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
726 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
727 Determines whether the connection with an SCGI server should be
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
728 closed when a client closes the connection without waiting
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
729 for a response.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
730 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
731
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
732 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
733
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
734
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
735 <directive name="scgi_ignore_headers">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
736 <syntax><value>field</value> ...</syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
737 <default/>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
738 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
739 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
740 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
741
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
742 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
743 Disables processing of certain response header fields from the SCGI server.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
744 The following fields can be ignored: <header>X-Accel-Redirect</header>,
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
745 <header>X-Accel-Expires</header>, <header>X-Accel-Limit-Rate</header> (1.1.6),
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
746 <header>X-Accel-Buffering</header> (1.1.6),
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
747 <header>X-Accel-Charset</header> (1.1.6), <header>Expires</header>,
1345
da296387cdac Documented the Vary support in proxy_ignore_headers and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1343
diff changeset
748 <header>Cache-Control</header>, <header>Set-Cookie</header> (0.8.44),
da296387cdac Documented the Vary support in proxy_ignore_headers and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1343
diff changeset
749 and <header>Vary</header> (1.7.7).
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
750 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
751
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
752 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
753 If not disabled, processing of these header fields has the following
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
754 effect:
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
755 <list type="bullet" compact="no">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
756
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
757 <listitem>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
758 <header>X-Accel-Expires</header>, <header>Expires</header>,
1345
da296387cdac Documented the Vary support in proxy_ignore_headers and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1343
diff changeset
759 <header>Cache-Control</header>, <header>Set-Cookie</header>,
da296387cdac Documented the Vary support in proxy_ignore_headers and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1343
diff changeset
760 and <header>Vary</header>
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
761 set the parameters of response <link id="scgi_cache_valid">caching</link>;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
762 </listitem>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
763
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
764 <listitem>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
765 <header>X-Accel-Redirect</header> performs an
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
766 <link doc="ngx_http_core_module.xml" id="internal">internal
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
767 redirect</link> to the specified URI;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
768 </listitem>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
769
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
770 <listitem>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
771 <header>X-Accel-Limit-Rate</header> sets the
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
772 <link doc="ngx_http_core_module.xml" id="limit_rate">rate
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
773 limit</link> for transmission of a response to a client;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
774 </listitem>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
775
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
776 <listitem>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
777 <header>X-Accel-Buffering</header> enables or disables
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
778 <link id="scgi_buffering">buffering</link> of a response;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
779 </listitem>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
780
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
781 <listitem>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
782 <header>X-Accel-Charset</header> sets the desired
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
783 <link doc="ngx_http_charset_module.xml" id="charset"/>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
784 of a response.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
785 </listitem>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
786
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
787 </list>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
788 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
789
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
790 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
791
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
792
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
793 <directive name="scgi_intercept_errors">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
794 <syntax><literal>on</literal> | <literal>off</literal></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
795 <default>off</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
796 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
797 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
798 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
799
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
800 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
801 Determines whether an SCGI server responses with codes greater than or equal
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
802 to 300 should be passed to a client or be redirected to nginx for processing
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
803 with the <link doc="ngx_http_core_module.xml" id="error_page"/> directive.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
804 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
805
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
806 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
807
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
808
1342
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
809 <directive name="scgi_limit_rate">
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
810 <syntax><value>rate</value></syntax>
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
811 <default>0</default>
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
812 <context>http</context>
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
813 <context>server</context>
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
814 <context>location</context>
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
815 <appeared-in>1.7.7</appeared-in>
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
816
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
817 <para>
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
818 Limits the speed of reading the response from the SCGI server.
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
819 The <value>rate</value> is specified in bytes per second.
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
820 The zero value disables rate limiting.
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
821 The limit is set per a request, and so if nginx simultaneously opens
1343
1bdde28e359b Fixed fallouts from the previous change.
Ruslan Ermilov <ru@nginx.com>
parents: 1342
diff changeset
822 two connections to the SCGI server,
1bdde28e359b Fixed fallouts from the previous change.
Ruslan Ermilov <ru@nginx.com>
parents: 1342
diff changeset
823 the overall rate will be twice as much as the specified limit.
1342
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
824 The limitation works only if
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
825 <link id="scgi_buffering">buffering</link> of responses from the SCGI
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
826 server is enabled.
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
827 </para>
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
828
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
829 </directive>
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
830
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
831
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
832 <directive name="scgi_max_temp_file_size">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
833 <syntax><value>size</value></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
834 <default>1024m</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
835 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
836 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
837 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
838
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
839 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
840 When <link id="scgi_buffering">buffering</link> of responses from the SCGI
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
841 server is enabled, and the whole response does not fit into the buffers
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
842 set by the <link id="scgi_buffer_size"/> and <link id="scgi_buffers"/>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
843 directives, a part of the response can be saved to a temporary file.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
844 This directive sets the maximum <value>size</value> of the temporary file.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
845 The size of data written to the temporary file at a time is set
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
846 by the <link id="scgi_temp_file_write_size"/> directive.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
847 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
848
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
849 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
850 The zero value disables buffering of responses to temporary files.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
851 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
852
1352
dbb618f60a54 Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents: 1349
diff changeset
853 <para>
dbb618f60a54 Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents: 1349
diff changeset
854 <note>
dbb618f60a54 Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents: 1349
diff changeset
855 This restriction does not apply to responses
dbb618f60a54 Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents: 1349
diff changeset
856 that will be <link id="scgi_cache">cached</link>
dbb618f60a54 Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents: 1349
diff changeset
857 or <link id="scgi_store">stored</link> on disk.
dbb618f60a54 Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents: 1349
diff changeset
858 </note>
dbb618f60a54 Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents: 1349
diff changeset
859 </para>
dbb618f60a54 Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents: 1349
diff changeset
860
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
861 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
862
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
863
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
864 <directive name="scgi_next_upstream">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
865 <syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
866 <literal>error</literal> |
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
867 <literal>timeout</literal> |
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
868 <literal>invalid_header</literal> |
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
869 <literal>http_500</literal> |
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
870 <literal>http_503</literal> |
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
871 <literal>http_403</literal> |
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
872 <literal>http_404</literal> |
1669
c872b93682f4 Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1659
diff changeset
873 <literal>non_idempotent</literal> |
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
874 <literal>off</literal>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
875 ...</syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
876 <default>error timeout</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
877 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
878 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
879 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
880
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
881 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
882 Specifies in which cases a request should be passed to the next server:
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
883 <list type="tag">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
884
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
885 <tag-name><literal>error</literal></tag-name>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
886 <tag-desc>an error occurred while establishing a connection with the
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
887 server, passing a request to it, or reading the response header;</tag-desc>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
888
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
889 <tag-name><literal>timeout</literal></tag-name>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
890 <tag-desc>a timeout has occurred while establishing a connection with the
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
891 server, passing a request to it, or reading the response header;</tag-desc>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
892
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
893 <tag-name><literal>invalid_header</literal></tag-name>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
894 <tag-desc>a server returned an empty or invalid response;</tag-desc>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
895
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
896 <tag-name><literal>http_500</literal></tag-name>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
897 <tag-desc>a server returned a response with the code 500;</tag-desc>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
898
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
899 <tag-name><literal>http_503</literal></tag-name>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
900 <tag-desc>a server returned a response with the code 503;</tag-desc>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
901
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
902 <tag-name><literal>http_403</literal></tag-name>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
903 <tag-desc>a server returned a response with the code 403;</tag-desc>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
904
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
905 <tag-name><literal>http_404</literal></tag-name>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
906 <tag-desc>a server returned a response with the code 404;</tag-desc>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
907
1669
c872b93682f4 Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1659
diff changeset
908 <tag-name id="non_idempotent"><literal>non_idempotent</literal></tag-name>
c872b93682f4 Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1659
diff changeset
909 <tag-desc>normally, requests with a
c872b93682f4 Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1659
diff changeset
910 <link url="http://tools.ietf.org/html/rfc7231#section-4.2.2">non-idempotent</link>
c872b93682f4 Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1659
diff changeset
911 method
c872b93682f4 Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1659
diff changeset
912 (<literal>POST</literal>, <literal>LOCK</literal>, <literal>PATCH</literal>)
c872b93682f4 Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1659
diff changeset
913 are not passed to the next server
c872b93682f4 Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1659
diff changeset
914 if a request has been sent to an upstream server (1.9.13);
c872b93682f4 Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1659
diff changeset
915 enabling this option explicitly allows retrying such requests;
c872b93682f4 Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1659
diff changeset
916 </tag-desc>
c872b93682f4 Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1659
diff changeset
917
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
918 <tag-name><literal>off</literal></tag-name>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
919 <tag-desc>disables passing a request to the next server.</tag-desc>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
920
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
921 </list>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
922 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
923
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
924 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
925 One should bear in mind that passing a request to the next server is
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
926 only possible if nothing has been sent to a client yet.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
927 That is, if an error or timeout occurs in the middle of the
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
928 transferring of a response, fixing this is impossible.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
929 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
930
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
931 <para>
1289
57fc39924d42 Proxy/memcached/fastcgi/scgi/uwsgi: updated link in _next_upstream directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1246
diff changeset
932 The directive also defines what is considered an
57fc39924d42 Proxy/memcached/fastcgi/scgi/uwsgi: updated link in _next_upstream directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1246
diff changeset
933 <link doc="ngx_http_upstream_module.xml" id="max_fails">unsuccessful
57fc39924d42 Proxy/memcached/fastcgi/scgi/uwsgi: updated link in _next_upstream directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1246
diff changeset
934 attempt</link> of communication with a server.
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
935 The cases of <literal>error</literal>, <literal>timeout</literal> and
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
936 <literal>invalid_header</literal> are always considered unsuccessful attempts,
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
937 even if they are not specified in the directive.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
938 The cases of <literal>http_500</literal> and <literal>http_503</literal> are
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
939 considered unsuccessful attempts only if they are specified in the directive.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
940 The cases of <literal>http_403</literal> and <literal>http_404</literal>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
941 are never considered unsuccessful attempts.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
942 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
943
1290
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
944 <para>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
945 Passing a request to the next server can be limited by
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
946 <link id="scgi_next_upstream_tries">the number of tries</link>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
947 and by <link id="scgi_next_upstream_timeout">time</link>.
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
948 </para>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
949
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
950 </directive>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
951
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
952
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
953 <directive name="scgi_next_upstream_timeout">
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
954 <syntax><value>time</value></syntax>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
955 <default>0</default>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
956 <context>http</context>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
957 <context>server</context>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
958 <context>location</context>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
959 <appeared-in>1.7.5</appeared-in>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
960
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
961 <para>
1672
9c98c4498f08 Rephrased the "proxy_next_upstream_timeout" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1669
diff changeset
962 Limits the time during which a request can be passed to the
1290
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
963 <link id="scgi_next_upstream">next server</link>.
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
964 The <literal>0</literal> value turns off this limitation.
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
965 </para>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
966
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
967 </directive>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
968
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
969
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
970 <directive name="scgi_next_upstream_tries">
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
971 <syntax><value>number</value></syntax>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
972 <default>0</default>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
973 <context>http</context>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
974 <context>server</context>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
975 <context>location</context>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
976 <appeared-in>1.7.5</appeared-in>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
977
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
978 <para>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
979 Limits the number of possible tries for passing a request to the
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
980 <link id="scgi_next_upstream">next server</link>.
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
981 The <literal>0</literal> value turns off this limitation.
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
982 </para>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
983
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
984 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
985
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
986
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
987 <directive name="scgi_no_cache">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
988 <syntax><value>string</value> ...</syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
989 <default/>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
990 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
991 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
992 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
993
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
994 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
995 Defines conditions under which the response will not be saved to a cache.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
996 If at least one value of the string parameters is not empty and is not
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
997 equal to “0” then the response will not be saved:
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
998 <example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
999 scgi_no_cache $cookie_nocache $arg_nocache$arg_comment;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1000 scgi_no_cache $http_pragma $http_authorization;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1001 </example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1002 Can be used along with the <link id="scgi_cache_bypass"/> directive.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1003 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1004
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1005 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1006
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1007
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1008 <directive name="scgi_param">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1009 <syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1010 <value>parameter</value> <value>value</value>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1011 [<literal>if_not_empty</literal>]</syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1012 <default/>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1013 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1014 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1015 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1016
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1017 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1018 Sets a <value>parameter</value> that should be passed to the SCGI server.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1019 The <value>value</value> can contain text, variables, and their combination.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1020 These directives are inherited from the previous level if and
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1021 only if there are no
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1022 <literal>scgi_param</literal>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1023 directives defined on the current level.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1024 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1025
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1026 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1027 Standard
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1028 <link url="http://tools.ietf.org/html/rfc3875#section-4.1">CGI
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1029 environment variables</link>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1030 should be provided as SCGI headers, see the <path>scgi_params</path> file
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1031 provided in the distribution:
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1032 <example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1033 location / {
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1034 include scgi_params;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1035 ...
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1036 }
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1037 </example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1038 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1039
1182
ec1097156f81 Scgi: restored if_not_empty lost during conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents: 1180
diff changeset
1040 <para>
1731
ae6bdb65ca7f Corrected article in fastcgi_param and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1696
diff changeset
1041 If the directive is specified with <literal>if_not_empty</literal> (1.1.11) then
1182
ec1097156f81 Scgi: restored if_not_empty lost during conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents: 1180
diff changeset
1042 such a parameter will not be passed to the server until its value is not empty:
ec1097156f81 Scgi: restored if_not_empty lost during conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents: 1180
diff changeset
1043 <example>
ec1097156f81 Scgi: restored if_not_empty lost during conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents: 1180
diff changeset
1044 scgi_param HTTPS $https if_not_empty;
ec1097156f81 Scgi: restored if_not_empty lost during conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents: 1180
diff changeset
1045 </example>
ec1097156f81 Scgi: restored if_not_empty lost during conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents: 1180
diff changeset
1046 </para>
ec1097156f81 Scgi: restored if_not_empty lost during conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents: 1180
diff changeset
1047
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1048 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1049
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1050
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1051 <directive name="scgi_pass">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1052 <syntax><value>address</value></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1053 <default/>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1054 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1055 <context>if in location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1056
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1057 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1058 Sets the address of an SCGI server.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1059 The address can be specified as a domain name or IP address,
1620
a225fa77389a Port in fastcgi_pass, scgi_pass, and uwsgi_pass is not optional.
Ruslan Ermilov <ru@nginx.com>
parents: 1582
diff changeset
1060 and a port:
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1061 <example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1062 scgi_pass localhost:9000;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1063 </example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1064 or as a UNIX-domain socket path:
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1065 <example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1066 scgi_pass unix:/tmp/scgi.socket;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1067 </example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1068 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1069
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1070 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1071 If a domain name resolves to several addresses, all of them will be
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1072 used in a round-robin fashion.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1073 In addition, an address can be specified as a
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1074 <link doc="ngx_http_upstream_module.xml">server group</link>.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1075 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1076
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1077 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1078
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1079
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1080 <directive name="scgi_pass_header">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1081 <syntax><value>field</value></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1082 <default/>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1083 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1084 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1085 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1086
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1087 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1088 Permits passing <link id="scgi_hide_header">otherwise disabled</link> header
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1089 fields from an SCGI server to a client.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1090 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1091
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1092 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1093
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1094
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1095 <directive name="scgi_pass_request_body">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1096 <syntax><literal>on</literal> | <literal>off</literal></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1097 <default>on</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1098 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1099 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1100 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1101
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1102 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1103 Indicates whether the original request body is passed
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1104 to the SCGI server.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1105 See also the <link id="scgi_pass_request_headers"/> directive.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1106 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1107
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1108 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1109
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1110
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1111 <directive name="scgi_pass_request_headers">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1112 <syntax><literal>on</literal> | <literal>off</literal></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1113 <default>on</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1114 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1115 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1116 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1117
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1118 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1119 Indicates whether the header fields of the original request are passed
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1120 to the SCGI server.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1121 See also the <link id="scgi_pass_request_body"/> directive.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1122 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1123
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1124 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1125
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1126
1524
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1443
diff changeset
1127 <directive name="scgi_read_timeout">
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1443
diff changeset
1128 <syntax><value>time</value></syntax>
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1443
diff changeset
1129 <default>60s</default>
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1443
diff changeset
1130 <context>http</context>
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1443
diff changeset
1131 <context>server</context>
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1443
diff changeset
1132 <context>location</context>
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1443
diff changeset
1133
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1443
diff changeset
1134 <para>
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1443
diff changeset
1135 Defines a timeout for reading a response from the SCGI server.
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1443
diff changeset
1136 The timeout is set only between two successive read operations,
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1443
diff changeset
1137 not for the transmission of the whole response.
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1443
diff changeset
1138 If the SCGI server does not transmit anything within this time,
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1443
diff changeset
1139 the connection is closed.
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1443
diff changeset
1140 </para>
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1443
diff changeset
1141
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1443
diff changeset
1142 </directive>
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1443
diff changeset
1143
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1443
diff changeset
1144
1437
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1145 <directive name="scgi_request_buffering">
1659
680cbf783efe Fixed some misuses of "value".
Ruslan Ermilov <ru@nginx.com>
parents: 1620
diff changeset
1146 <syntax><literal>on</literal> | <literal>off</literal></syntax>
1437
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1147 <default>on</default>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1148 <context>http</context>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1149 <context>server</context>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1150 <context>location</context>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1151 <appeared-in>1.7.11</appeared-in>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1152
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1153 <para>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1154 Enables or disables buffering of a client request body.
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1155 </para>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1156
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1157 <para>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1158 When buffering is enabled, the entire request body is
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1159 <link doc="ngx_http_core_module.xml" id="client_body_buffer_size">read</link>
1440
657885fd2b96 Corrected description of proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1437
diff changeset
1160 from the client before sending the request to an SCGI server.
1437
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1161 </para>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1162
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1163 <para>
1440
657885fd2b96 Corrected description of proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1437
diff changeset
1164 When buffering is disabled, the request body is sent to the SCGI server
1437
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1165 immediately as it is received.
1440
657885fd2b96 Corrected description of proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1437
diff changeset
1166 In this case, the request cannot be passed to the
657885fd2b96 Corrected description of proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1437
diff changeset
1167 <link id="scgi_next_upstream">next server</link>
1437
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1168 if nginx already started sending the request body.
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1169 </para>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1170
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1171 <para>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1172 When HTTP/1.1 chunked transfer encoding is used
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1173 to send the original request body,
1443
a55553729d63 Unified text of scgi and uwsgi request buffering with proxy.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1440
diff changeset
1174 the request body will be buffered regardless of the directive value.
1437
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1175 </para>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1176
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1177 </directive>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1178
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
1179
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1180 <directive name="scgi_send_timeout">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1181 <syntax><value>time</value></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1182 <default>60s</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1183 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1184 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1185 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1186
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1187 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1188 Sets a timeout for transmitting a request to the SCGI server.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1189 The timeout is set only between two successive write operations,
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1190 not for the transmission of the whole request.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1191 If the SCGI server does not receive anything within this time,
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1192 the connection is closed.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1193 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1194
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1195 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1196
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1197
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1198 <directive name="scgi_store">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1199 <syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1200 <literal>on</literal> |
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1201 <literal>off</literal> |
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1202 <value>string</value></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1203 <default>off</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1204 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1205 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1206 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1207
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1208 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1209 Enables saving of files to a disk.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1210 The <literal>on</literal> parameter saves files with paths
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1211 corresponding to the directives
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1212 <link doc="ngx_http_core_module.xml" id="alias"/> or
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1213 <link doc="ngx_http_core_module.xml" id="root"/>.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1214 The <literal>off</literal> parameter disables saving of files.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1215 In addition, the file name can be set explicitly using the
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1216 <value>string</value> with variables:
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1217 <example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1218 scgi_store /data/www$original_uri;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1219 </example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1220 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1221
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1222 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1223 The modification time of files is set according to the received
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1224 <header>Last-Modified</header> response header field.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1225 The response is first written to a temporary file,
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1226 and then the file is renamed.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1227 Starting from version 0.8.9, temporary files and the persistent store
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1228 can be put on different file systems.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1229 However, be aware that in this case a file is copied
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1230 across two file systems instead of the cheap renaming operation.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1231 It is thus recommended that for any given location both saved files and a
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1232 directory holding temporary files, set by the <link id="scgi_temp_path"/>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1233 directive, are put on the same file system.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1234 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1235
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1236 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1237 This directive can be used to create local copies of static unchangeable
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1238 files, e.g.:
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1239 <example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1240 location /images/ {
1184
55857cbf562d Fixed alignment issues after mechanical conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents: 1182
diff changeset
1241 root /data/www;
55857cbf562d Fixed alignment issues after mechanical conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents: 1182
diff changeset
1242 error_page 404 = /fetch$uri;
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1243 }
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1244
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1245 location /fetch/ {
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1246 internal;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1247
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1248 scgi_pass backend:9000;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1249 ...
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1250
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1251 scgi_store on;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1252 scgi_store_access user:rw group:rw all:r;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1253 scgi_temp_path /data/temp;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1254
1184
55857cbf562d Fixed alignment issues after mechanical conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents: 1182
diff changeset
1255 alias /data/www/;
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1256 }
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1257 </example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1258 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1259
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1260 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1261
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1262
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1263 <directive name="scgi_store_access">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1264 <syntax><value>users</value>:<value>permissions</value> ...</syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1265 <default>user:rw</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1266 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1267 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1268 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1269
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1270 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1271 Sets access permissions for newly created files and directories, e.g.:
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1272 <example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1273 scgi_store_access user:rw group:rw all:r;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1274 </example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1275 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1276
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1277 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1278 If any <literal>group</literal> or <literal>all</literal> access permissions
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1279 are specified then <literal>user</literal> permissions may be omitted:
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1280 <example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1281 scgi_store_access group:rw all:r;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1282 </example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1283 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1284
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1285 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1286
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1287
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1288 <directive name="scgi_temp_file_write_size">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1289 <syntax><value>size</value></syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1290 <default>8k|16k</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1291 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1292 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1293 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1294
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1295 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1296 Limits the <value>size</value> of data written to a temporary file
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1297 at a time, when buffering of responses from the SCGI server
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1298 to temporary files is enabled.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1299 By default, <value>size</value> is limited by two buffers set by the
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1300 <link id="scgi_buffer_size"/> and <link id="scgi_buffers"/> directives.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1301 The maximum size of a temporary file is set by the
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1302 <link id="scgi_max_temp_file_size"/> directive.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1303 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1304
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1305 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1306
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1307
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1308 <directive name="scgi_temp_path">
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1309 <syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1310 <value>path</value>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1311 [<value>level1</value>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1312 [<value>level2</value>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1313 [<value>level3</value>]]]</syntax>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1314 <default>scgi_temp</default>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1315 <context>http</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1316 <context>server</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1317 <context>location</context>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1318
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1319 <para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1320 Defines a directory for storing temporary files
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1321 with data received from SCGI servers.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1322 Up to three-level subdirectory hierarchy can be used underneath the specified
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1323 directory.
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1324 For example, in the following configuration
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1325 <example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1326 scgi_temp_path /spool/nginx/scgi_temp 1 2;
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1327 </example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1328 a temporary file might look like this:
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1329 <example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1330 /spool/nginx/scgi_temp/<emphasis>7</emphasis>/<emphasis>45</emphasis>/00000123<emphasis>457</emphasis>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1331 </example>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1332 </para>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1333
1384
66ee77849563 Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1382
diff changeset
1334 <para>
66ee77849563 Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1382
diff changeset
1335 See also the <literal>use_temp_path</literal> parameter of the
66ee77849563 Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1382
diff changeset
1336 <link id="scgi_cache_path"/> directive.
66ee77849563 Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1382
diff changeset
1337 </para>
66ee77849563 Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1382
diff changeset
1338
1180
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1339 </directive>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1340
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1341 </section>
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1342
9d3beb5890eb Documented the scgi module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff changeset
1343 </module>