annotate xml/en/docs/http/ngx_http_proxy_module.xml @ 1923:66a30a380fba

Fixed links to tools.ietf.org.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 06 Mar 2017 16:02:23 +0300
parents ec4af97e4403
children dd96a09dd4f7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1 <?xml version="1.0"?>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2
580
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 575
diff changeset
3 <!--
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 575
diff changeset
4 Copyright (C) Igor Sysoev
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 575
diff changeset
5 Copyright (C) Nginx, Inc.
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 575
diff changeset
6 -->
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 575
diff changeset
7
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
9
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
10 <module name="Module ngx_http_proxy_module"
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
11 link="/en/docs/http/ngx_http_proxy_module.html"
589
764fbac1b8b4 Added document revision.
Ruslan Ermilov <ru@nginx.com>
parents: 580
diff changeset
12 lang="en"
1923
66a30a380fba Fixed links to tools.ietf.org.
Ruslan Ermilov <ru@nginx.com>
parents: 1912
diff changeset
13 rev="58">
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
14
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
15 <section id="summary">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
16
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
17 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
18 The <literal>ngx_http_proxy_module</literal> module allows passing
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
19 requests to another server.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
20 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
21
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
22 </section>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
23
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
24
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
25 <section id="example" name="Example Configuration">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
26
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
27 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
28 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
29 location / {
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
30 proxy_pass http://localhost:8000;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
31 proxy_set_header Host $host;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
32 proxy_set_header X-Real-IP $remote_addr;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
33 }
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
34 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
35 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
36
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
37 </section>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
38
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
39
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
40 <section id="directives" name="Directives">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
41
772
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
42 <directive name="proxy_bind">
1885
6839c258c473 Added <literal> tag to proxy bind transparent.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1838
diff changeset
43 <syntax>
6839c258c473 Added <literal> tag to proxy bind transparent.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1838
diff changeset
44 <value>address</value>
6839c258c473 Added <literal> tag to proxy bind transparent.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1838
diff changeset
45 [<literal>transparent</literal>] |
6839c258c473 Added <literal> tag to proxy bind transparent.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1838
diff changeset
46 <literal>off</literal></syntax>
772
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
47 <default/>
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
48 <context>http</context>
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
49 <context>server</context>
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
50 <context>location</context>
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
51 <appeared-in>0.8.22</appeared-in>
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
52
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
53 <para>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 959
diff changeset
54 Makes outgoing connections to a proxied server originate
1748
be371be7a5c8 Documented optional port for proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1717
diff changeset
55 from the specified local IP address with an optional port (1.11.2).
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 959
diff changeset
56 Parameter value can contain variables (1.3.12).
815
ed29fd8be462 *_bind: variables support and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents: 799
diff changeset
57 The special value <literal>off</literal> (1.3.12) cancels the effect
ed29fd8be462 *_bind: variables support and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents: 799
diff changeset
58 of the <literal>proxy_bind</literal> directive
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 959
diff changeset
59 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: 1717
diff changeset
60 system to auto-assign the local IP address and port.
772
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
61 </para>
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
62
1696
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
63 <para id="proxy_bind_transparent">
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
64 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
65 outgoing connections to a proxied server originate
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
66 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
67 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
68 <example>
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
69 proxy_bind $remote_addr transparent;
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
70 </example>
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
71 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
72 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
73 <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
74 and configure kernel routing table
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
75 to intercept network traffic from the proxied server.
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
76 </para>
d855e7cc3b2f Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1672
diff changeset
77
772
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
78 </directive>
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
79
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
80
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
81 <directive name="proxy_buffer_size">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
82 <syntax><value>size</value></syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
83 <default>4k|8k</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
84 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
85 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
86 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
87
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
88 <para>
1547
c340ebfeeed6 Deleted duplicate word in proxy_buffer_size for http.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1542
diff changeset
89 Sets the <value>size</value> of the buffer used for reading the first part
1151
4c2324a7eeea Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1149
diff changeset
90 of the response received from the proxied server.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
91 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: 1547
diff changeset
92 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: 1547
diff changeset
93 This is either 4K or 8K, depending on a platform.
1151
4c2324a7eeea Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1149
diff changeset
94 It can be made smaller, however.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
95 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
96
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
97 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
98
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
99
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
100 <directive name="proxy_buffering">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
101 <syntax><literal>on</literal> | <literal>off</literal></syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
102 <default>on</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
103 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
104 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
105 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
106
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
107 <para>
405
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
108 Enables or disables buffering of responses from the proxied server.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
109 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
110
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
111 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
112 When buffering is enabled, nginx receives a response from the proxied server
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
113 as soon as possible, saving it into the buffers set by the
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
114 <link id="proxy_buffer_size"/> and <link id="proxy_buffers"/> directives.
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
115 If the whole response does not fit into memory, a part of it can be saved
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
116 to a <link id="proxy_temp_path">temporary file</link> on the disk.
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
117 Writing to temporary files is controlled by the
405
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
118 <link id="proxy_max_temp_file_size"/> and
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
119 <link id="proxy_temp_file_write_size"/> directives.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
120 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
121
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
122 <para>
1151
4c2324a7eeea Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1149
diff changeset
123 When buffering is disabled, the response is passed to a client synchronously,
362
db6774c4c699 Fixed translation.
Ruslan Ermilov <ru@nginx.com>
parents: 351
diff changeset
124 immediately as it is received.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
125 nginx will not try to read the whole response from the proxied server.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
126 The maximum size of the data that nginx can receive from the server
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
127 at a time is set by the <link id="proxy_buffer_size"/> directive.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
128 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
129
506
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
130 <para>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
131 Buffering can also be enabled or disabled by passing
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
132 “<literal>yes</literal>” or “<literal>no</literal>” in the
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
133 <header>X-Accel-Buffering</header> response header field.
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
134 This capability can be disabled using the
992
7cc496641627 Removed extraneous links.
Ruslan Ermilov <ru@nginx.com>
parents: 985
diff changeset
135 <link id="proxy_ignore_headers"/> directive.
506
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
136 </para>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
137
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
138 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
139
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
140
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
141 <directive name="proxy_buffers">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
142 <syntax><value>number</value> <value>size</value></syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
143 <default>8 4k|8k</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
144 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
145 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
146 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
147
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
148 <para>
1151
4c2324a7eeea Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1149
diff changeset
149 Sets the <value>number</value> and <value>size</value> of the
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
150 buffers used for reading a response from the proxied server,
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
151 for a single connection.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
152 By default, the buffer size is equal to one memory page.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
153 This is either 4K or 8K, depending on a platform.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
154 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
155
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
156 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
157
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
158
405
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
159 <directive name="proxy_busy_buffers_size">
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
160 <syntax><value>size</value></syntax>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
161 <default>8k|16k</default>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
162 <context>http</context>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
163 <context>server</context>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
164 <context>location</context>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
165
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
166 <para>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
167 When <link id="proxy_buffering">buffering</link> of responses from the proxied
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
168 server is enabled, limits the total <value>size</value> of buffers that
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
169 can be busy sending a response to the client while the response is not
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
170 yet fully read.
1151
4c2324a7eeea Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1149
diff changeset
171 In the meantime, the rest of the buffers can be used for reading the response
4c2324a7eeea Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1149
diff changeset
172 and, if needed, buffering part of the response to a temporary file.
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
173 By default, <value>size</value> is limited by the size of two buffers set by the
405
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
174 <link id="proxy_buffer_size"/> and <link id="proxy_buffers"/> directives.
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
175 </para>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
176
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
177 </directive>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
178
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
179
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
180 <directive name="proxy_cache">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
181 <syntax><value>zone</value> | <literal>off</literal></syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
182 <default>off</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
183 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
184 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
185 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
186
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
187 <para>
575
ebcb351d9eb3 Consistently using the term "shared memory zone".
Ruslan Ermilov <ru@nginx.com>
parents: 535
diff changeset
188 Defines a shared memory zone used for caching.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
189 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: 1376
diff changeset
190 Parameter value can contain variables (1.7.9).
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
191 The <literal>off</literal> parameter disables caching inherited
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
192 from the previous configuration level.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
193 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
194
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
195 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
196
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
197
1909
399d0e188195 Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1885
diff changeset
198 <directive name="proxy_cache_background_update">
399d0e188195 Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1885
diff changeset
199 <syntax><literal>on</literal> | <literal>off</literal></syntax>
399d0e188195 Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1885
diff changeset
200 <default>off</default>
399d0e188195 Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1885
diff changeset
201 <context>http</context>
399d0e188195 Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1885
diff changeset
202 <context>server</context>
399d0e188195 Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1885
diff changeset
203 <context>location</context>
399d0e188195 Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1885
diff changeset
204 <appeared-in>1.11.10</appeared-in>
399d0e188195 Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1885
diff changeset
205
399d0e188195 Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1885
diff changeset
206 <para>
399d0e188195 Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1885
diff changeset
207 Allows starting a background subrequest
399d0e188195 Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1885
diff changeset
208 to update an expired cache item,
399d0e188195 Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1885
diff changeset
209 while a stale cached response is returned to the client.
399d0e188195 Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1885
diff changeset
210 Note that it is necessary to
399d0e188195 Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1885
diff changeset
211 <link id="proxy_cache_use_stale_updating">allow</link>
399d0e188195 Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1885
diff changeset
212 the usage of a stale cached response when it is being updated.
399d0e188195 Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1885
diff changeset
213 </para>
399d0e188195 Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1885
diff changeset
214
399d0e188195 Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1885
diff changeset
215 </directive>
399d0e188195 Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1885
diff changeset
216
399d0e188195 Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1885
diff changeset
217
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
218 <directive name="proxy_cache_bypass">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
219 <syntax><value>string</value> ...</syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
220 <default/>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
221 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
222 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
223 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
224
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
225 <para>
294
9f5ee1c6fca5 Use consistent wording.
Ruslan Ermilov <ru@nginx.com>
parents: 281
diff changeset
226 Defines conditions under which the response will not be taken from a cache.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
227 If at least one value of the string parameters is not empty and is not
294
9f5ee1c6fca5 Use consistent wording.
Ruslan Ermilov <ru@nginx.com>
parents: 281
diff changeset
228 equal to “0” then the response will not be taken from the cache:
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
229 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
230 proxy_cache_bypass $cookie_nocache $arg_nocache$arg_comment;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
231 proxy_cache_bypass $http_pragma $http_authorization;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
232 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
233 Can be used along with the <link id="proxy_no_cache"/> directive.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
234 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
235
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
236 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
237
1599
12714bbf9230 Documented the "proxy_cache_convert_head" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1587
diff changeset
238 <directive name="proxy_cache_convert_head">
12714bbf9230 Documented the "proxy_cache_convert_head" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1587
diff changeset
239 <syntax><literal>on</literal> | <literal>off</literal></syntax>
12714bbf9230 Documented the "proxy_cache_convert_head" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1587
diff changeset
240 <default>on</default>
12714bbf9230 Documented the "proxy_cache_convert_head" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1587
diff changeset
241 <context>http</context>
12714bbf9230 Documented the "proxy_cache_convert_head" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1587
diff changeset
242 <context>server</context>
12714bbf9230 Documented the "proxy_cache_convert_head" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1587
diff changeset
243 <context>location</context>
12714bbf9230 Documented the "proxy_cache_convert_head" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1587
diff changeset
244 <appeared-in>1.9.7</appeared-in>
12714bbf9230 Documented the "proxy_cache_convert_head" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1587
diff changeset
245
12714bbf9230 Documented the "proxy_cache_convert_head" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1587
diff changeset
246 <para>
12714bbf9230 Documented the "proxy_cache_convert_head" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1587
diff changeset
247 Enables or disables the conversion of the “<literal>HEAD</literal>” method
12714bbf9230 Documented the "proxy_cache_convert_head" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1587
diff changeset
248 to “<literal>GET</literal>” for caching.
12714bbf9230 Documented the "proxy_cache_convert_head" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1587
diff changeset
249 When the conversion is disabled, the
12714bbf9230 Documented the "proxy_cache_convert_head" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1587
diff changeset
250 <link id="proxy_cache_key">cache key</link> should be configured
12714bbf9230 Documented the "proxy_cache_convert_head" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1587
diff changeset
251 to include the <var>$request_method</var>.
12714bbf9230 Documented the "proxy_cache_convert_head" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1587
diff changeset
252 </para>
12714bbf9230 Documented the "proxy_cache_convert_head" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1587
diff changeset
253
12714bbf9230 Documented the "proxy_cache_convert_head" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1587
diff changeset
254 </directive>
12714bbf9230 Documented the "proxy_cache_convert_head" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1587
diff changeset
255
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
256
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
257 <directive name="proxy_cache_key">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
258 <syntax><value>string</value></syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
259 <default>$scheme$proxy_host$request_uri</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
260 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
261 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
262 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
263
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
264 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
265 Defines a key for caching, for example
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
266 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
267 proxy_cache_key "$host$request_uri $cookie_user";
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
268 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
269 By default, the directive’s value is close to the string
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
270 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
271 proxy_cache_key $scheme$proxy_host$uri$is_args$args;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
272 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
273 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
274
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
275 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
276
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
277
302
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
278 <directive name="proxy_cache_lock">
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
279 <syntax><literal>on</literal> | <literal>off</literal></syntax>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
280 <default>off</default>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
281 <context>http</context>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
282 <context>server</context>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
283 <context>location</context>
310
86732337c730 Added a historical information for proxy_cache_lock, proxy_cache_lock_timeout,
Ruslan Ermilov <ru@nginx.com>
parents: 302
diff changeset
284 <appeared-in>1.1.12</appeared-in>
302
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
285
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
286 <para>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
287 When enabled, only one request at a time will be allowed to populate
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
288 a new cache element identified according to the <link id="proxy_cache_key"/>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
289 directive by passing a request to a proxied server.
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
290 Other requests of the same cache element will either wait
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
291 for a response to appear in the cache or the cache lock for
302
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
292 this element to be released, up to the time set by the
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
293 <link id="proxy_cache_lock_timeout"/> directive.
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
294 </para>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
295
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
296 </directive>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
297
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
298
1376
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
299 <directive name="proxy_cache_lock_age">
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
300 <syntax><value>time</value></syntax>
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
301 <default>5s</default>
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
302 <context>http</context>
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
303 <context>server</context>
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
304 <context>location</context>
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
305 <appeared-in>1.7.8</appeared-in>
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
306
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
307 <para>
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
308 If the last request passed to the proxied server
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
309 for populating a new cache element
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
310 has not completed for the specified <value>time</value>,
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
311 one more request may be passed to the proxied server.
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
312 </para>
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
313
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
314 </directive>
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
315
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
316
302
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
317 <directive name="proxy_cache_lock_timeout">
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
318 <syntax><value>time</value></syntax>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
319 <default>5s</default>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
320 <context>http</context>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
321 <context>server</context>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
322 <context>location</context>
310
86732337c730 Added a historical information for proxy_cache_lock, proxy_cache_lock_timeout,
Ruslan Ermilov <ru@nginx.com>
parents: 302
diff changeset
323 <appeared-in>1.1.12</appeared-in>
302
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
324
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
325 <para>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
326 Sets a timeout for <link id="proxy_cache_lock"/>.
1376
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
327 When the <value>time</value> expires,
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
328 the request will be passed to the proxied server,
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
329 however, the response will not be cached.
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
330 <note>
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
331 Before 1.7.8, the response could be cached.
6e54b85dfb86 Documented the "proxy_cache_lock_age" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1372
diff changeset
332 </note>
302
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
333 </para>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
334
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
335 </directive>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
336
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
337
1838
0d6ac4838921 Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1833
diff changeset
338 <directive name="proxy_cache_max_range_offset">
0d6ac4838921 Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1833
diff changeset
339 <syntax><value>number</value></syntax>
0d6ac4838921 Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1833
diff changeset
340 <default/>
0d6ac4838921 Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1833
diff changeset
341 <context>http</context>
0d6ac4838921 Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1833
diff changeset
342 <context>server</context>
0d6ac4838921 Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1833
diff changeset
343 <context>location</context>
0d6ac4838921 Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1833
diff changeset
344 <appeared-in>1.11.6</appeared-in>
0d6ac4838921 Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1833
diff changeset
345
0d6ac4838921 Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1833
diff changeset
346 <para>
0d6ac4838921 Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1833
diff changeset
347 Sets an offset in bytes for byte-range requests.
0d6ac4838921 Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1833
diff changeset
348 If the range is beyond the offset,
0d6ac4838921 Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1833
diff changeset
349 the range request will be passed to the proxied server
0d6ac4838921 Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1833
diff changeset
350 and the response will not be cached.
0d6ac4838921 Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1833
diff changeset
351 </para>
0d6ac4838921 Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1833
diff changeset
352
0d6ac4838921 Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1833
diff changeset
353 </directive>
0d6ac4838921 Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1833
diff changeset
354
0d6ac4838921 Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1833
diff changeset
355
790
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
356 <directive name="proxy_cache_methods">
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
357 <syntax>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
358 <literal>GET</literal> |
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
359 <literal>HEAD</literal> |
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
360 <literal>POST</literal>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
361 ...</syntax>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
362 <default>GET HEAD</default>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
363 <context>http</context>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
364 <context>server</context>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
365 <context>location</context>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
366 <appeared-in>0.7.59</appeared-in>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
367
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
368 <para>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
369 If the client request method is listed in this directive then
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
370 the response will be cached.
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
371 “<literal>GET</literal>” and “<literal>HEAD</literal>” methods are always
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
372 added to the list, though it is recommended to specify them explicitly.
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
373 See also the <link id="proxy_no_cache"/> directive.
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
374 </para>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
375
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
376 </directive>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
377
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
378
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
379 <directive name="proxy_cache_min_uses">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
380 <syntax><value>number</value></syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
381 <default>1</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
382 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
383 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
384 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
385
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
386 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
387 Sets the <value>number</value> of requests after which the response
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
388 will be cached.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
389 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
390
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
391 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
392
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
393
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
394 <directive name="proxy_cache_path">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
395 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
396 <value>path</value>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
397 [<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
398 [<literal>use_temp_path</literal>=<literal>on</literal>|<literal>off</literal>]
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
399 <literal>keys_zone</literal>=<value>name</value>:<value>size</value>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
400 [<literal>inactive</literal>=<value>time</value>]
508
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
401 [<literal>max_size</literal>=<value>size</value>]
1810
bc6341aaa832 Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1803
diff changeset
402 [<literal>manager_files</literal>=<value>number</value>]
bc6341aaa832 Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1803
diff changeset
403 [<literal>manager_sleep</literal>=<value>time</value>]
bc6341aaa832 Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1803
diff changeset
404 [<literal>manager_threshold</literal>=<value>time</value>]
508
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
405 [<literal>loader_files</literal>=<value>number</value>]
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
406 [<literal>loader_sleep</literal>=<value>time</value>]
1582
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
407 [<literal>loader_threshold</literal>=<value>time</value>]
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
408 [<literal>purger</literal>=<literal>on</literal>|<literal>off</literal>]
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
409 [<literal>purger_files</literal>=<value>number</value>]
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
410 [<literal>purger_sleep</literal>=<value>time</value>]
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
411 [<literal>purger_threshold</literal>=<value>time</value>]</syntax>
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
412 <default/>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
413 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
414
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
415 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
416 Sets the path and other parameters of a cache.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
417 Cache data are stored in files.
1190
dd4cfc6ce770 Corrected description of *_cache_path file names.
Ruslan Ermilov <ru@nginx.com>
parents: 1189
diff changeset
418 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
419 applying the MD5 function to the
dd4cfc6ce770 Corrected description of *_cache_path file names.
Ruslan Ermilov <ru@nginx.com>
parents: 1189
diff changeset
420 <link id="proxy_cache_key">cache key</link>.
1796
1d576e8d6ead Clarified the "levels" parameter of proxy_cache_path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1748
diff changeset
421 The <literal>levels</literal> parameter defines hierarchy levels of a cache:
1d576e8d6ead Clarified the "levels" parameter of proxy_cache_path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1748
diff changeset
422 from 1 to 3, each level accepts values 1 or 2.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
423 For example, in the following configuration
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
424 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
425 proxy_cache_path /data/nginx/cache levels=1:2 keys_zone=one:10m;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
426 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
427 file names in a cache will look like this:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
428 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
429 /data/nginx/cache/<emphasis>c</emphasis>/<emphasis>29</emphasis>/b7f54b2df7773722d382f4809d650<emphasis>29c</emphasis>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
430 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
431 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
432
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
433 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
434 A cached response is first written to a temporary file,
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 959
diff changeset
435 and then the file is renamed.
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
436 Starting from version 0.8.9, temporary files and the cache can be put on
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 959
diff changeset
437 different file systems.
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 959
diff changeset
438 However, be aware that in this case a file is copied
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
439 across two file systems instead of the cheap renaming operation.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
440 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
441 holding temporary files
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
442 are put on the same file system.
1414
5addfab7e171 Corrected article.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1384
diff changeset
443 The directory for temporary files is set based on
1384
66ee77849563 Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1382
diff changeset
444 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
445 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
446 the directory set by the <link id="proxy_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
447 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
448 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
449 temporary files will be put directly in the cache directory.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
450 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
451
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
452 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
453 In addition, all active keys and information about data are stored
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
454 in a shared memory zone, whose <value>name</value> and <value>size</value>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
455 are configured by the <literal>keys_zone</literal> parameter.
1189
f25d00109de0 Documented cache keys_zone memory estimates.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1166
diff changeset
456 One megabyte zone can store about 8 thousand keys.
f25d00109de0 Documented cache keys_zone memory estimates.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1166
diff changeset
457 </para>
f25d00109de0 Documented cache keys_zone memory estimates.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1166
diff changeset
458
f25d00109de0 Documented cache keys_zone memory estimates.
Maxim Dounin <mdounin@mdounin.ru>
parents: 1166
diff changeset
459 <para>
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
460 Cached data that are not accessed during the time specified by the
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
461 <literal>inactive</literal> parameter get removed from the cache
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
462 regardless of their freshness.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
463 By default, <literal>inactive</literal> is set to 10 minutes.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
464 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
465
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
466 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
467 The special “cache manager” process monitors the maximum cache size set
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
468 by the <literal>max_size</literal> parameter.
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
469 When this size is exceeded, it removes the least recently used data.
1810
bc6341aaa832 Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1803
diff changeset
470 The data is removed in iterations configured by
bc6341aaa832 Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1803
diff changeset
471 <literal>manager_files</literal>,
bc6341aaa832 Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1803
diff changeset
472 <literal>manager_threshold</literal>, and
bc6341aaa832 Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1803
diff changeset
473 <literal>manager_sleep</literal> parameters (1.11.5).
bc6341aaa832 Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1803
diff changeset
474 During one iteration no more than <literal>manager_files</literal> items
1812
35ec213c16cf Removed extraneous whitespace.
Ruslan Ermilov <ru@nginx.com>
parents: 1810
diff changeset
475 are deleted (by default, 100).
1810
bc6341aaa832 Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1803
diff changeset
476 The duration of one iteration is limited by the
bc6341aaa832 Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1803
diff changeset
477 <literal>manager_threshold</literal> parameter (by default, 200 milliseconds).
bc6341aaa832 Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1803
diff changeset
478 Between iterations, a pause configured by the <literal>manager_sleep</literal>
bc6341aaa832 Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1803
diff changeset
479 parameter (by default, 50 milliseconds) is made.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
480 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
481
508
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
482 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
483 A minute after the start the special “cache loader” process is activated.
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
484 It loads information about previously cached data stored on file system
508
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
485 into a cache zone.
1810
bc6341aaa832 Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1803
diff changeset
486 The loading is also done in iterations.
508
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
487 During one iteration no more than <literal>loader_files</literal> items
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
488 are loaded (by default, 100).
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
489 Besides, the duration of one iteration is limited by the
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
490 <literal>loader_threshold</literal> parameter (by default, 200 milliseconds).
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
491 Between iterations, a pause configured by the <literal>loader_sleep</literal>
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
492 parameter (by default, 50 milliseconds) is made.
508
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
493 </para>
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
494
1582
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
495 <para>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
496 Additionally,
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
497 the following parameters are available as part of our
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
498 <commercial_version>commercial subscription</commercial_version>:
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
499 </para>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
500
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
501 <para>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
502 <list type="tag">
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
503
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
504 <tag-name id="purger">
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
505 <literal>purger</literal>=<literal>on</literal>|<literal>off</literal>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
506 </tag-name>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
507 <tag-desc>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
508 Instructs whether cache entries that match a
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
509 <link id="proxy_cache_purge">wildcard key</link>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
510 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
511 Setting the parameter to <literal>on</literal>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
512 (default is <literal>off</literal>)
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
513 will activate the “cache purger” process that
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
514 permanently iterates through all cache entries
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
515 and deletes the entries that match the wildcard key.
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
516 </tag-desc>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
517
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
518 <tag-name id="purger_files">
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
519 <literal>purger_files</literal>=<value>number</value>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
520 </tag-name>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
521 <tag-desc>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
522 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
523 By default, <literal>purger_files</literal> is set to 10.
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
524 </tag-desc>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
525
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
526 <tag-name id="purger_threshold">
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
527 <literal>purger_threshold</literal>=<value>number</value>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
528 </tag-name>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
529 <tag-desc>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
530 Sets the duration of one iteration (1.7.12).
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
531 By default, <literal>purger_threshold</literal> is set to 50 milliseconds.
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
532 </tag-desc>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
533
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
534 <tag-name id="purger_sleep">
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
535 <literal>purger_sleep</literal>=<value>number</value>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
536 </tag-name>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
537 <tag-desc>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
538 Sets a pause between iterations (1.7.12).
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
539 By default, <literal>purger_sleep</literal> is set to 50 milliseconds.
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
540 </tag-desc>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
541
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
542 </list>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
543 </para>
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
544
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
545 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
546
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
547
1028
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
548 <directive name="proxy_cache_purge">
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
549 <syntax>string ...</syntax>
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
550 <default/>
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
551 <context>http</context>
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
552 <context>server</context>
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
553 <context>location</context>
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
554 <appeared-in>1.5.7</appeared-in>
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
555
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
556 <para>
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
557 Defines conditions under which the request will be considered a cache
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
558 purge request.
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
559 If at least one value of the string parameters is not empty and is not equal
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
560 to “0” then the cache entry with a corresponding
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
561 <link id="proxy_cache_key">cache key</link> is removed.
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
562 The result of successful operation is indicated by returning
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
563 the <http-status code="204" text="No Content"/> response.
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
564 </para>
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
565
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
566 <para>
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
567 If the <link id="proxy_cache_key">cache key</link> of a purge request ends
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
568 with an asterisk (“<literal>*</literal>”), all cache entries matching the
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
569 wildcard key will be removed from the cache.
1582
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
570 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
571 for either <link id="proxy_cache_path">inactivity</link>,
8973c7b37854 Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1550
diff changeset
572 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
573 or a client attempts to access them.
1028
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
574 </para>
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
575
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
576 <para>
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
577 Example configuration:
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
578 <example>
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
579 proxy_cache_path /data/nginx/cache keys_zone=cache_zone:10m;
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
580
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
581 map $request_method $purge_method {
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
582 PURGE 1;
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
583 default 0;
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
584 }
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
585
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
586 server {
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
587 ...
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
588 location / {
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
589 proxy_pass http://backend;
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
590 proxy_cache cache_zone;
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
591 proxy_cache_key $uri;
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
592 proxy_cache_purge $purge_method;
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
593 }
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
594 }
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
595 </example>
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
596 <note>
1128
1594ed379f1f De-i18n'ed <commercial_version/>.
Ruslan Ermilov <ru@nginx.com>
parents: 1088
diff changeset
597 This functionality is available as part of our
1594ed379f1f De-i18n'ed <commercial_version/>.
Ruslan Ermilov <ru@nginx.com>
parents: 1088
diff changeset
598 <commercial_version>commercial subscription</commercial_version>.
1028
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
599 </note>
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
600 </para>
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
601
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
602 </directive>
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
603
e582a10b1917 Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1015
diff changeset
604
1011
2ad2f30efdf2 Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1005
diff changeset
605 <directive name="proxy_cache_revalidate">
2ad2f30efdf2 Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1005
diff changeset
606 <syntax><literal>on</literal> | <literal>off</literal></syntax>
2ad2f30efdf2 Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1005
diff changeset
607 <default>off</default>
2ad2f30efdf2 Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1005
diff changeset
608 <context>http</context>
2ad2f30efdf2 Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1005
diff changeset
609 <context>server</context>
2ad2f30efdf2 Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1005
diff changeset
610 <context>location</context>
1015
af77dd40abeb Documented the appearance of "fastcgi_" and "proxy_cache_revalidate".
Vladimir Homutov <vl@nginx.com>
parents: 1011
diff changeset
611 <appeared-in>1.5.7</appeared-in>
1011
2ad2f30efdf2 Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1005
diff changeset
612
2ad2f30efdf2 Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1005
diff changeset
613 <para>
2ad2f30efdf2 Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1005
diff changeset
614 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
615 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
616 header fields.
1011
2ad2f30efdf2 Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1005
diff changeset
617 </para>
2ad2f30efdf2 Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1005
diff changeset
618
2ad2f30efdf2 Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1005
diff changeset
619 </directive>
2ad2f30efdf2 Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1005
diff changeset
620
2ad2f30efdf2 Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents: 1005
diff changeset
621
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
622 <directive name="proxy_cache_use_stale">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
623 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
624 <literal>error</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
625 <literal>timeout</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
626 <literal>invalid_header</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
627 <literal>updating</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
628 <literal>http_500</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
629 <literal>http_502</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
630 <literal>http_503</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
631 <literal>http_504</literal> |
917
e26a18eb5ccd Documented http_403 in proxy_next_upstream and friends.
Maxim Dounin <mdounin@mdounin.ru>
parents: 907
diff changeset
632 <literal>http_403</literal> |
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
633 <literal>http_404</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
634 <literal>off</literal>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
635 ...</syntax>
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
636 <default>off</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
637 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
638 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
639 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
640
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
641 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
642 Determines in which cases a stale cached response can be used
1910
41cf2c2d8c5c Cache: support for stale-while-revalidate and stale-if-error.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1909
diff changeset
643 during communication with the proxied server.
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
644 The directive’s parameters match the parameters of the
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
645 <link id="proxy_next_upstream"/> directive.
504
695f83494c19 Emphasized on what the "updating" parameter of the "proxy_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents: 417
diff changeset
646 </para>
695f83494c19 Emphasized on what the "updating" parameter of the "proxy_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents: 417
diff changeset
647
695f83494c19 Emphasized on what the "updating" parameter of the "proxy_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents: 417
diff changeset
648 <para>
1542
a13a99cf46ea Better documented "*_cache_use_stale error".
Ruslan Ermilov <ru@nginx.com>
parents: 1524
diff changeset
649 The <literal>error</literal> parameter also permits
a13a99cf46ea Better documented "*_cache_use_stale error".
Ruslan Ermilov <ru@nginx.com>
parents: 1524
diff changeset
650 using a stale cached response if a proxied server to process a request
a13a99cf46ea Better documented "*_cache_use_stale error".
Ruslan Ermilov <ru@nginx.com>
parents: 1524
diff changeset
651 cannot be selected.
a13a99cf46ea Better documented "*_cache_use_stale error".
Ruslan Ermilov <ru@nginx.com>
parents: 1524
diff changeset
652 </para>
a13a99cf46ea Better documented "*_cache_use_stale error".
Ruslan Ermilov <ru@nginx.com>
parents: 1524
diff changeset
653
1909
399d0e188195 Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1885
diff changeset
654 <para id="proxy_cache_use_stale_updating">
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
655 Additionally, the <literal>updating</literal> parameter permits
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
656 using a stale cached response if it is currently being updated.
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
657 This allows minimizing the number of accesses to proxied servers
504
695f83494c19 Emphasized on what the "updating" parameter of the "proxy_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents: 417
diff changeset
658 when updating cached data.
1912
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
659 </para>
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
660
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
661 <para>
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
662 Using a stale cached response
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
663 can also be enabled directly in the response header
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
664 for a specified number of seconds after the response became stale (1.11.10).
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
665 This has lower priority than using the directive parameters.
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
666 <list type="bullet" compact="no">
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
667
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
668 <listitem>
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
669 The
1910
41cf2c2d8c5c Cache: support for stale-while-revalidate and stale-if-error.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1909
diff changeset
670 “<link url="https://tools.ietf.org/html/rfc5861#section-3">stale-while-revalidate</link>”
1912
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
671 extension of the <header>Cache-Control</header> header field permits
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
672 using a stale cached response if it is currently being updated.
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
673 </listitem>
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
674
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
675 <listitem>
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
676 The
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
677 “<link url="https://tools.ietf.org/html/rfc5861#section-4">stale-if-error</link>”
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
678 extension of the <header>Cache-Control</header> header field permits
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
679 using a stale cached response in case of an error.
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
680 </listitem>
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
681
ec4af97e4403 Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1910
diff changeset
682 </list>
504
695f83494c19 Emphasized on what the "updating" parameter of the "proxy_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents: 417
diff changeset
683 </para>
695f83494c19 Emphasized on what the "updating" parameter of the "proxy_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents: 417
diff changeset
684
695f83494c19 Emphasized on what the "updating" parameter of the "proxy_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents: 417
diff changeset
685 <para>
695f83494c19 Emphasized on what the "updating" parameter of the "proxy_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents: 417
diff changeset
686 To minimize the number of accesses to proxied servers when
695f83494c19 Emphasized on what the "updating" parameter of the "proxy_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents: 417
diff changeset
687 populating a new cache element, the <link id="proxy_cache_lock"/>
695f83494c19 Emphasized on what the "updating" parameter of the "proxy_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents: 417
diff changeset
688 directive can be used.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
689 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
690
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
691 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
692
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
693
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
694 <directive name="proxy_cache_valid">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
695 <syntax>[<value>code</value> ...] <value>time</value></syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
696 <default/>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
697 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
698 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
699 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
700
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
701 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
702 Sets caching time for different response codes.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
703 For example, the following directives
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
704 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
705 proxy_cache_valid 200 302 10m;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
706 proxy_cache_valid 404 1m;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
707 </example>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 959
diff changeset
708 set 10 minutes of caching for responses with codes 200 and 302
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
709 and 1 minute for responses with code 404.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
710 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
711
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
712 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
713 If only caching <value>time</value> is specified
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
714 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
715 proxy_cache_valid 5m;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
716 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
717 then only 200, 301, and 302 responses are cached.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
718 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
719
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
720 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
721 In addition, the <literal>any</literal> parameter can be specified
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
722 to cache any responses:
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
723 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
724 proxy_cache_valid 200 302 10m;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
725 proxy_cache_valid 301 1h;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
726 proxy_cache_valid any 1m;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
727 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
728 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
729
506
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
730 <para>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
731 Parameters of caching can also be set directly
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
732 in the response header.
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
733 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
734 <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
735
97c8b146cb0e Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents: 1345
diff changeset
736 <listitem>
506
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
737 The <header>X-Accel-Expires</header> header field sets caching time of a
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
738 response in seconds.
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 959
diff changeset
739 The zero value disables caching for a response.
1151
4c2324a7eeea Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1149
diff changeset
740 If the value starts with the <literal>@</literal> prefix, it sets an absolute
506
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
741 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
742 </listitem>
97c8b146cb0e Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents: 1345
diff changeset
743
97c8b146cb0e Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents: 1345
diff changeset
744 <listitem>
1151
4c2324a7eeea Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1149
diff changeset
745 If the header does not include the <header>X-Accel-Expires</header> field,
506
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
746 parameters of caching may be set in the header fields
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
747 <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
748 </listitem>
97c8b146cb0e Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents: 1345
diff changeset
749
97c8b146cb0e Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents: 1345
diff changeset
750 <listitem>
1151
4c2324a7eeea Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1149
diff changeset
751 If the header includes the <header>Set-Cookie</header> field, such a
506
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
752 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
753 </listitem>
97c8b146cb0e Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents: 1345
diff changeset
754
1353
25db29c8875e Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents: 1352
diff changeset
755 <listitem>
25db29c8875e Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents: 1352
diff changeset
756 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
757 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
758 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
759 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
760 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
761 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
762 </listitem>
25db29c8875e Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents: 1352
diff changeset
763
1349
97c8b146cb0e Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents: 1345
diff changeset
764 </list>
506
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
765 Processing of one or more of these response header fields can be disabled
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
766 using the <link id="proxy_ignore_headers"/> directive.
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
767 </para>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
768
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
769 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
770
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
771
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
772 <directive name="proxy_connect_timeout">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
773 <syntax><value>time</value></syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
774 <default>60s</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
775 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
776 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
777 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
778
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
779 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
780 Defines a timeout for establishing a connection with a proxied server.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
781 It should be noted that this timeout cannot usually exceed 75 seconds.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
782 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
783
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
784 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
785
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
786
417
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
787 <directive name="proxy_cookie_domain">
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
788 <syntax><literal>off</literal></syntax>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
789 <syntax><value>domain</value> <value>replacement</value></syntax>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
790 <default>off</default>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
791 <context>http</context>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
792 <context>server</context>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
793 <context>location</context>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
794 <appeared-in>1.1.15</appeared-in>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
795
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
796 <para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
797 Sets a text that should be changed in the <literal>domain</literal>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
798 attribute of the <header>Set-Cookie</header> header fields of a
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
799 proxied server response.
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
800 Suppose a proxied server returned the <header>Set-Cookie</header>
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
801 header field with the attribute
417
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
802 “<literal>domain=localhost</literal>”.
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
803 The directive
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
804 <example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
805 proxy_cookie_domain localhost example.org;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
806 </example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
807 will rewrite this attribute to
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
808 “<literal>domain=example.org</literal>”.
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
809 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
810
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
811 <para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
812 A dot at the beginning of the <value>domain</value> and
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
813 <value>replacement</value> strings and the <literal>domain</literal>
417
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
814 attribute is ignored.
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
815 Matching is case-insensitive.
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
816 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
817
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
818 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
819 The <value>domain</value> and <value>replacement</value> strings
417
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
820 can contain variables:
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
821 <example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
822 proxy_cookie_domain www.$host $host;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
823 </example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
824 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
825
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
826 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
827 The directive can also be specified using regular expressions.
417
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
828 In this case, <value>domain</value> should start from
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
829 the “<literal>~</literal>” symbol.
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
830 A regular expression can contain named and positional captures,
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
831 and <value>replacement</value> can reference them:
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
832 <example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
833 proxy_cookie_domain ~\.(?P&lt;sl_domain&gt;[-0-9a-z]+\.[a-z]+)$ $sl_domain;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
834 </example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
835 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
836
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
837 <para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
838 There could be several <literal>proxy_cookie_domain</literal> directives:
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
839 <example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
840 proxy_cookie_domain localhost example.org;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
841 proxy_cookie_domain ~\.([a-z]+\.[a-z]+)$ $1;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
842 </example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
843 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
844
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
845 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
846 The <literal>off</literal> parameter cancels the effect of all
417
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
847 <literal>proxy_cookie_domain</literal> directives on the current level:
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
848 <example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
849 proxy_cookie_domain off;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
850 proxy_cookie_domain localhost example.org;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
851 proxy_cookie_domain www.example.org example.org;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
852 </example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
853 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
854
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
855 </directive>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
856
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
857
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
858 <directive name="proxy_cookie_path">
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
859 <syntax><literal>off</literal></syntax>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
860 <syntax><value>path</value> <value>replacement</value></syntax>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
861 <default>off</default>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
862 <context>http</context>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
863 <context>server</context>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
864 <context>location</context>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
865 <appeared-in>1.1.15</appeared-in>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
866
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
867 <para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
868 Sets a text that should be changed in the <literal>path</literal>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
869 attribute of the <header>Set-Cookie</header> header fields of a
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
870 proxied server response.
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
871 Suppose a proxied server returned the <header>Set-Cookie</header>
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
872 header field with the attribute
417
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
873 “<literal>path=/two/some/uri/</literal>”.
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
874 The directive
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
875 <example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
876 proxy_cookie_path /two/ /;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
877 </example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
878 will rewrite this attribute to
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
879 “<literal>path=/some/uri/</literal>”.
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
880 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
881
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
882 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
883 The <value>path</value> and <value>replacement</value> strings
417
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
884 can contain variables:
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
885 <example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
886 proxy_cookie_path $uri /some$uri;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
887 </example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
888 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
889
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
890 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
891 The directive can also be specified using regular expressions.
417
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
892 In this case, <value>path</value> should either start from
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
893 the “<literal>~</literal>” symbol for a case-sensitive matching,
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
894 or from the “<literal>~*</literal>” symbols for case-insensitive
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
895 matching.
1149
1501e5848052 Corrected the usage of the definite article.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1146
diff changeset
896 The regular expression can contain named and positional captures,
417
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
897 and <value>replacement</value> can reference them:
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
898 <example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
899 proxy_cookie_path ~*^/user/([^/]+) /u/$1;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
900 </example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
901 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
902
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
903 <para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
904 There could be several <literal>proxy_cookie_path</literal> directives:
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
905 <example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
906 proxy_cookie_path /one/ /;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
907 proxy_cookie_path / /two/;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
908 </example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
909 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
910
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
911 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
912 The <literal>off</literal> parameter cancels the effect of all
417
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
913 <literal>proxy_cookie_path</literal> directives on the current level:
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
914 <example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
915 proxy_cookie_path off;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
916 proxy_cookie_path /two/ /;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
917 proxy_cookie_path ~*^/user/([^/]+) /u/$1;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
918 </example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
919 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
920
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
921 </directive>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
922
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
923
1337
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1298
diff changeset
924 <directive name="proxy_force_ranges">
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1298
diff changeset
925 <syntax><literal>on</literal> | <literal>off</literal></syntax>
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1298
diff changeset
926 <default>off</default>
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1298
diff changeset
927 <context>http</context>
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1298
diff changeset
928 <context>server</context>
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1298
diff changeset
929 <context>location</context>
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1298
diff changeset
930 <appeared-in>1.7.7</appeared-in>
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1298
diff changeset
931
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1298
diff changeset
932 <para>
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1298
diff changeset
933 Enables byte-range support
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1298
diff changeset
934 for both cached and uncached responses from the proxied server
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1298
diff changeset
935 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: 1298
diff changeset
936 </para>
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1298
diff changeset
937
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1298
diff changeset
938 </directive>
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1298
diff changeset
939
91a064bdb4f9 Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1298
diff changeset
940
799
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
941 <directive name="proxy_headers_hash_bucket_size">
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
942 <syntax><value>size</value></syntax>
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
943 <default>64</default>
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
944 <context>http</context>
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
945 <context>server</context>
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
946 <context>location</context>
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
947
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
948 <para>
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
949 Sets the bucket <value>size</value> for hash tables
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
950 used by the <link id="proxy_hide_header"/> and <link id="proxy_set_header"/>
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
951 directives.
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
952 The details of setting up hash tables are provided in a separate
799
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
953 <link doc="../hash.xml">document</link>.
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
954 </para>
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
955
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
956 </directive>
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
957
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
958
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
959 <directive name="proxy_headers_hash_max_size">
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
960 <syntax><value>size</value></syntax>
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
961 <default>512</default>
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
962 <context>http</context>
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
963 <context>server</context>
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
964 <context>location</context>
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
965
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
966 <para>
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
967 Sets the maximum <value>size</value> of hash tables
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
968 used by the <link id="proxy_hide_header"/> and <link id="proxy_set_header"/>
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
969 directives.
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
970 The details of setting up hash tables are provided in a separate
799
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
971 <link doc="../hash.xml">document</link>.
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
972 </para>
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
973
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
974 </directive>
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
975
9e5847af3b2d Documented the "proxy_headers_hash_bucket/max_size" directives.
Vladimir Homutov <vl@nginx.com>
parents: 790
diff changeset
976
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
977 <directive name="proxy_hide_header">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
978 <syntax><value>field</value></syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
979 <default/>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
980 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
981 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
982 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
983
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
984 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
985 By default,
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
986 nginx does not pass the header fields <header>Date</header>,
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
987 <header>Server</header>, <header>X-Pad</header>, and
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
988 <header>X-Accel-...</header> from the response of a proxied
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
989 server to a client.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
990 The <literal>proxy_hide_header</literal> directive sets additional fields
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
991 that will not be passed.
294
9f5ee1c6fca5 Use consistent wording.
Ruslan Ermilov <ru@nginx.com>
parents: 281
diff changeset
992 If, on the contrary, the passing of fields needs to be permitted,
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
993 the <link id="proxy_pass_header"/> directive can be used.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
994 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
995
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
996 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
997
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
998
316
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
999 <directive name="proxy_http_version">
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
1000 <syntax><literal>1.0</literal> | <literal>1.1</literal></syntax>
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
1001 <default>1.0</default>
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
1002 <context>http</context>
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
1003 <context>server</context>
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
1004 <context>location</context>
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
1005 <appeared-in>1.1.4</appeared-in>
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
1006
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
1007 <para>
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
1008 Sets the HTTP protocol version for proxying.
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
1009 By default, version 1.0 is used.
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
1010 Version 1.1 is recommended for use with
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
1011 <link doc="ngx_http_upstream_module.xml" id="keepalive"/>
1587
c2a0a18e65ba Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1582
diff changeset
1012 connections and
c2a0a18e65ba Added keepalive info for ntlm.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1582
diff changeset
1013 <link doc="ngx_http_upstream_module.xml" id="ntlm">NTLM authentication</link>.
316
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
1014 </para>
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
1015
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
1016 </directive>
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
1017
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
1018
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1019 <directive name="proxy_ignore_client_abort">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1020 <syntax><literal>on</literal> | <literal>off</literal></syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1021 <default>off</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1022 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1023 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1024 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1025
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1026 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1027 Determines whether the connection with a proxied server should be
1151
4c2324a7eeea Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1149
diff changeset
1028 closed when a client closes the connection without waiting
294
9f5ee1c6fca5 Use consistent wording.
Ruslan Ermilov <ru@nginx.com>
parents: 281
diff changeset
1029 for a response.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1030 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1031
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1032 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1033
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1034
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1035 <directive name="proxy_ignore_headers">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1036 <syntax><value>field</value> ...</syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1037 <default/>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1038 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1039 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1040 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1041
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1042 <para>
294
9f5ee1c6fca5 Use consistent wording.
Ruslan Ermilov <ru@nginx.com>
parents: 281
diff changeset
1043 Disables processing of certain response header fields from the proxied server.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1044 The following fields can be ignored: <header>X-Accel-Redirect</header>,
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1045 <header>X-Accel-Expires</header>, <header>X-Accel-Limit-Rate</header> (1.1.6),
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1046 <header>X-Accel-Buffering</header> (1.1.6),
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1047 <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
1048 <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
1049 and <header>Vary</header> (1.7.7).
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1050 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1051
506
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1052 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1053 If not disabled, processing of these header fields has the following
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1054 effect:
506
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1055 <list type="bullet" compact="no">
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1056
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1057 <listitem>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1058 <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
1059 <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
1060 and <header>Vary</header>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1061 set the parameters of response <link id="proxy_cache_valid">caching</link>;
506
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1062 </listitem>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1063
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1064 <listitem>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1065 <header>X-Accel-Redirect</header> performs an
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1066 <link doc="ngx_http_core_module.xml" id="internal">internal
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1067 redirect</link> to the specified URI;
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1068 </listitem>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1069
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1070 <listitem>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1071 <header>X-Accel-Limit-Rate</header> sets the
506
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1072 <link doc="ngx_http_core_module.xml" id="limit_rate">rate
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1073 limit</link> for transmission of a response to a client;
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1074 </listitem>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1075
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1076 <listitem>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1077 <header>X-Accel-Buffering</header> enables or disables
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1078 <link id="proxy_buffering">buffering</link> of a response;
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1079 </listitem>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1080
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1081 <listitem>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1082 <header>X-Accel-Charset</header> sets the desired
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1083 <link doc="ngx_http_charset_module.xml" id="charset"/>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1084 of a response.
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1085 </listitem>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1086
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1087 </list>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1088 </para>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
1089
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1090 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1091
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1092
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1093 <directive name="proxy_intercept_errors">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1094 <syntax><literal>on</literal> | <literal>off</literal></syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1095 <default>off</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1096 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1097 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1098 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1099
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1100 <para>
297
94c8df379088 Added missing word.
Ruslan Ermilov <ru@nginx.com>
parents: 294
diff changeset
1101 Determines whether proxied responses with codes greater than or equal
1803
621d0c682113 Clarified description of proxy_intercept_errors and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1796
diff changeset
1102 to 300 should be passed to a client
621d0c682113 Clarified description of proxy_intercept_errors and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1796
diff changeset
1103 or be intercepted and redirected to nginx for processing
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 959
diff changeset
1104 with the <link doc="ngx_http_core_module.xml" id="error_page"/> directive.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1105 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1106
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1107 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1108
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1109
1342
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
1110 <directive name="proxy_limit_rate">
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
1111 <syntax><value>rate</value></syntax>
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
1112 <default>0</default>
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
1113 <context>http</context>
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
1114 <context>server</context>
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
1115 <context>location</context>
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
1116 <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
1117
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
1118 <para>
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
1119 Limits the speed of reading the response from the proxied server.
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
1120 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
1121 The zero value disables rate limiting.
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
1122 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
1123 two connections to the proxied server,
1bdde28e359b Fixed fallouts from the previous change.
Ruslan Ermilov <ru@nginx.com>
parents: 1342
diff changeset
1124 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
1125 The limitation works only if
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
1126 <link id="proxy_buffering">buffering</link> of responses from the proxied
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
1127 server is enabled.
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
1128 </para>
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
1129
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
1130 </directive>
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
1131
758fc0b02651 Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1337
diff changeset
1132
405
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1133 <directive name="proxy_max_temp_file_size">
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1134 <syntax><value>size</value></syntax>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1135 <default>1024m</default>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1136 <context>http</context>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1137 <context>server</context>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1138 <context>location</context>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1139
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1140 <para>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1141 When <link id="proxy_buffering">buffering</link> of responses from the proxied
1153
4e20e4f8f49b Finished truncation of "memory buffers" to just "buffers".
Ruslan Ermilov <ru@nginx.com>
parents: 1151
diff changeset
1142 server is enabled, and the whole response does not fit into the buffers
405
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1143 set by the <link id="proxy_buffer_size"/> and <link id="proxy_buffers"/>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 959
diff changeset
1144 directives, a part of the response can be saved to a temporary file.
1151
4c2324a7eeea Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1149
diff changeset
1145 This directive sets the maximum <value>size</value> of the temporary file.
4c2324a7eeea Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1149
diff changeset
1146 The size of data written to the temporary file at a time is set
405
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1147 by the <link id="proxy_temp_file_write_size"/> directive.
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1148 </para>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1149
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1150 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1151 The zero value disables buffering of responses to temporary files.
405
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1152 </para>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1153
1352
dbb618f60a54 Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents: 1349
diff changeset
1154 <para>
dbb618f60a54 Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents: 1349
diff changeset
1155 <note>
dbb618f60a54 Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents: 1349
diff changeset
1156 This restriction does not apply to responses
dbb618f60a54 Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents: 1349
diff changeset
1157 that will be <link id="proxy_cache">cached</link>
dbb618f60a54 Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents: 1349
diff changeset
1158 or <link id="proxy_store">stored</link> on disk.
dbb618f60a54 Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents: 1349
diff changeset
1159 </note>
dbb618f60a54 Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents: 1349
diff changeset
1160 </para>
dbb618f60a54 Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents: 1349
diff changeset
1161
405
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1162 </directive>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1163
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1164
787
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1165 <directive name="proxy_method">
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1166 <syntax><value>method</value></syntax>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1167 <default/>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1168 <context>http</context>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1169 <context>server</context>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1170 <context>location</context>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1171
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1172 <para>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1173 Specifies the HTTP <value>method</value> to use in requests forwarded
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1174 to the proxied server instead of the method from the client request.
1833
0c4b43e26cea Documented variables support in proxy_method.
Ruslan Ermilov <ru@nginx.com>
parents: 1812
diff changeset
1175 Parameter value can contain variables (1.11.6).
787
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1176 </para>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1177
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1178 </directive>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1179
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1180
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1181 <directive name="proxy_next_upstream">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1182 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
1183 <literal>error</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
1184 <literal>timeout</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
1185 <literal>invalid_header</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
1186 <literal>http_500</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
1187 <literal>http_502</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
1188 <literal>http_503</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
1189 <literal>http_504</literal> |
917
e26a18eb5ccd Documented http_403 in proxy_next_upstream and friends.
Maxim Dounin <mdounin@mdounin.ru>
parents: 907
diff changeset
1190 <literal>http_403</literal> |
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
1191 <literal>http_404</literal> |
1669
c872b93682f4 Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1659
diff changeset
1192 <literal>non_idempotent</literal> |
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
1193 <literal>off</literal>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
1194 ...</syntax>
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1195 <default>error timeout</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1196 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1197 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1198 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1199
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1200 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1201 Specifies in which cases a request should be passed to the next server:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1202 <list type="tag">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1203
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1204 <tag-name><literal>error</literal></tag-name>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1205 <tag-desc>an error occurred while establishing a connection with the
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1206 server, passing a request to it, or reading the response header;</tag-desc>
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1207
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1208 <tag-name><literal>timeout</literal></tag-name>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1209 <tag-desc>a timeout has occurred while establishing a connection with the
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1210 server, passing a request to it, or reading the response header;</tag-desc>
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1211
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1212 <tag-name><literal>invalid_header</literal></tag-name>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1213 <tag-desc>a server returned an empty or invalid response;</tag-desc>
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1214
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1215 <tag-name><literal>http_500</literal></tag-name>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1216 <tag-desc>a server returned a response with the code 500;</tag-desc>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1217
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1218 <tag-name><literal>http_502</literal></tag-name>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1219 <tag-desc>a server returned a response with the code 502;</tag-desc>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1220
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1221 <tag-name><literal>http_503</literal></tag-name>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1222 <tag-desc>a server returned a response with the code 503;</tag-desc>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1223
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1224 <tag-name><literal>http_504</literal></tag-name>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1225 <tag-desc>a server returned a response with the code 504;</tag-desc>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1226
917
e26a18eb5ccd Documented http_403 in proxy_next_upstream and friends.
Maxim Dounin <mdounin@mdounin.ru>
parents: 907
diff changeset
1227 <tag-name><literal>http_403</literal></tag-name>
e26a18eb5ccd Documented http_403 in proxy_next_upstream and friends.
Maxim Dounin <mdounin@mdounin.ru>
parents: 907
diff changeset
1228 <tag-desc>a server returned a response with the code 403;</tag-desc>
e26a18eb5ccd Documented http_403 in proxy_next_upstream and friends.
Maxim Dounin <mdounin@mdounin.ru>
parents: 907
diff changeset
1229
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1230 <tag-name><literal>http_404</literal></tag-name>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1231 <tag-desc>a server returned a response with the code 404;</tag-desc>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1232
1669
c872b93682f4 Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1659
diff changeset
1233 <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
1234 <tag-desc>normally, requests with a
1923
66a30a380fba Fixed links to tools.ietf.org.
Ruslan Ermilov <ru@nginx.com>
parents: 1912
diff changeset
1235 <link url="https://tools.ietf.org/html/rfc7231#section-4.2.2">non-idempotent</link>
1669
c872b93682f4 Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1659
diff changeset
1236 method
c872b93682f4 Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1659
diff changeset
1237 (<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
1238 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
1239 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
1240 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
1241 </tag-desc>
c872b93682f4 Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1659
diff changeset
1242
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1243 <tag-name><literal>off</literal></tag-name>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1244 <tag-desc>disables passing a request to the next server.</tag-desc>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1245
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1246 </list>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1247 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1248
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1249 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1250 One should bear in mind that passing a request to the next server is
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1251 only possible if nothing has been sent to a client yet.
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1252 That is, if an error or timeout occurs in the middle of the
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1253 transferring of a response, fixing this is impossible.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1254 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1255
942
ba3d6ade3513 Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents: 917
diff changeset
1256 <para>
1289
57fc39924d42 Proxy/memcached/fastcgi/scgi/uwsgi: updated link in _next_upstream directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1246
diff changeset
1257 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
1258 <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
1259 attempt</link> of communication with a server.
942
ba3d6ade3513 Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents: 917
diff changeset
1260 The cases of <literal>error</literal>, <literal>timeout</literal> and
ba3d6ade3513 Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents: 917
diff changeset
1261 <literal>invalid_header</literal> are always considered unsuccessful attempts,
ba3d6ade3513 Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents: 917
diff changeset
1262 even if they are not specified in the directive.
ba3d6ade3513 Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents: 917
diff changeset
1263 The cases of <literal>http_500</literal>, <literal>http_502</literal>,
ba3d6ade3513 Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents: 917
diff changeset
1264 <literal>http_503</literal> and <literal>http_504</literal> are
ba3d6ade3513 Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents: 917
diff changeset
1265 considered unsuccessful attempts only if they are specified in the directive.
ba3d6ade3513 Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents: 917
diff changeset
1266 The cases of <literal>http_403</literal> and <literal>http_404</literal>
ba3d6ade3513 Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents: 917
diff changeset
1267 are never considered unsuccessful attempts.
ba3d6ade3513 Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents: 917
diff changeset
1268 </para>
ba3d6ade3513 Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents: 917
diff changeset
1269
1290
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1270 <para>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1271 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
1272 <link id="proxy_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
1273 and by <link id="proxy_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
1274 </para>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1275
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1276 </directive>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1277
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1278
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1279 <directive name="proxy_next_upstream_timeout">
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1280 <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
1281 <default>0</default>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1282 <context>http</context>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1283 <context>server</context>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1284 <context>location</context>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1285 <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
1286
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1287 <para>
1672
9c98c4498f08 Rephrased the "proxy_next_upstream_timeout" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1669
diff changeset
1288 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
1289 <link id="proxy_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
1290 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
1291 </para>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1292
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1293 </directive>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1294
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1295
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1296 <directive name="proxy_next_upstream_tries">
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1297 <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
1298 <default>0</default>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1299 <context>http</context>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1300 <context>server</context>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1301 <context>location</context>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1302 <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
1303
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1304 <para>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1305 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
1306 <link id="proxy_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
1307 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
1308 </para>
f5cc9f2aef9a Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1289
diff changeset
1309
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1310 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1311
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1312
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1313 <directive name="proxy_no_cache">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1314 <syntax><value>string</value> ...</syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1315 <default/>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1316 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1317 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1318 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1319
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1320 <para>
294
9f5ee1c6fca5 Use consistent wording.
Ruslan Ermilov <ru@nginx.com>
parents: 281
diff changeset
1321 Defines conditions under which the response will not be saved to a cache.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1322 If at least one value of the string parameters is not empty and is not
294
9f5ee1c6fca5 Use consistent wording.
Ruslan Ermilov <ru@nginx.com>
parents: 281
diff changeset
1323 equal to “0” then the response will not be saved:
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1324 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1325 proxy_no_cache $cookie_nocache $arg_nocache$arg_comment;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1326 proxy_no_cache $http_pragma $http_authorization;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1327 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1328 Can be used along with the <link id="proxy_cache_bypass"/> directive.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1329 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1330
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1331 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1332
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1333
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1334 <directive name="proxy_pass">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1335 <syntax><value>URL</value></syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1336 <default/>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1337 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1338 <context>if in location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1339 <context>limit_except</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1340
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1341 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1342 Sets the protocol and address of a proxied server and an optional URI
535
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1343 to which a location should be mapped.
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1344 As a protocol, “<literal>http</literal>” or “<literal>https</literal>”
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1345 can be specified.
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1346 The address can be specified as a domain name or IP address,
535
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1347 and an optional port:
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1348 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1349 proxy_pass http://localhost:8000/uri/;
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1350 </example>
535
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1351 or as a UNIX-domain socket path specified after the word
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1352 “<literal>unix</literal>” and enclosed in colons:
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1353 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1354 proxy_pass http://unix:/tmp/backend.socket:/uri/;
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1355 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1356 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1357
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1358 <para>
294
9f5ee1c6fca5 Use consistent wording.
Ruslan Ermilov <ru@nginx.com>
parents: 281
diff changeset
1359 If a domain name resolves to several addresses, all of them will be
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1360 used in a round-robin fashion.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1361 In addition, an address can be specified as a
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1362 <link doc="ngx_http_upstream_module.xml">server group</link>.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1363 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1364
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1365 <para>
535
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1366 A request URI is passed to the server as follows:
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1367 <list type="bullet" compact="no">
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1368
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1369 <listitem>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1370 If the <literal>proxy_pass</literal> directive is specified with a URI,
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1371 then when a request is passed to the server, the part of a
535
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1372 <link doc="ngx_http_core_module.xml" id="location">normalized</link>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1373 request URI matching the location is replaced by a URI
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1374 specified in the directive:
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1375 <example>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1376 location /name/ {
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1377 proxy_pass http://127.0.0.1/remote/;
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1378 }
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1379 </example>
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1380 </listitem>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1381
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1382 <listitem>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1383 If <literal>proxy_pass</literal> is specified without a URI,
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1384 the request URI is passed to the server in the same form
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1385 as sent by a client when the original request is processed,
535
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1386 or the full normalized request URI is passed
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1387 when processing the changed URI:
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1388 <example>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1389 location /some/path/ {
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1390 proxy_pass http://127.0.0.1;
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1391 }
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1392 </example>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1393 <note>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1394 Before version 1.1.12,
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1395 if <literal>proxy_pass</literal> is specified without a URI,
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1396 the original request URI might be passed
535
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1397 instead of the changed URI in some cases.
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1398 </note>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1399 </listitem>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1400 </list>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1401 </para>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1402
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1403 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1404 In some cases, the part of a request URI to be replaced cannot be determined:
535
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1405 <list type="bullet" compact="no">
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1406
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1407 <listitem>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1408 When location is specified using a regular expression.
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1409 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1410 In this case, the directive should be specified without a URI.
535
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1411 </para>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1412 </listitem>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1413
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1414 <listitem>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1415 When the URI is changed inside a proxied location using the
535
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1416 <link doc="ngx_http_rewrite_module.xml" id="rewrite"/> directive,
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1417 and this same configuration will be used to process a request
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1418 (<literal>break</literal>):
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1419 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1420 location /name/ {
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1421 rewrite /name/([^/]+) /users?name=$1 break;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1422 proxy_pass http://127.0.0.1;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1423 }
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1424 </example>
535
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1425 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1426 In this case, the URI specified in the directive is ignored and
535
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1427 the full changed request URI is passed to the server.
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1428 </para>
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1429 </listitem>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1430 </list>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1431 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1432
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1433 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1434 A server name, its port and the passed URI can also be specified using
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1435 variables:
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1436 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1437 proxy_pass http://$host$uri;
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1438 </example>
535
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
1439 or even like this:
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1440 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1441 proxy_pass $request;
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1442 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1443 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1444
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1445 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1446 In this case, the server name is searched among the described
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1447 <link doc="ngx_http_upstream_module.xml">server groups</link>,
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1448 and, if not found, is determined using a
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1449 <link doc="ngx_http_core_module.xml" id="resolver"/>.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1450 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1451
849
0ed4c093c026 WebSocket proxying howto.
Homutov Vladimir <vl@nginx.com>
parents: 815
diff changeset
1452 <para>
0ed4c093c026 WebSocket proxying howto.
Homutov Vladimir <vl@nginx.com>
parents: 815
diff changeset
1453 <link doc="websocket.xml">WebSocket</link> proxying requires special
0ed4c093c026 WebSocket proxying howto.
Homutov Vladimir <vl@nginx.com>
parents: 815
diff changeset
1454 configuration and is supported since version 1.3.13.
0ed4c093c026 WebSocket proxying howto.
Homutov Vladimir <vl@nginx.com>
parents: 815
diff changeset
1455 </para>
0ed4c093c026 WebSocket proxying howto.
Homutov Vladimir <vl@nginx.com>
parents: 815
diff changeset
1456
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1457 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1458
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1459
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1460 <directive name="proxy_pass_header">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1461 <syntax><value>field</value></syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1462 <default/>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1463 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1464 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1465 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1466
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1467 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1468 Permits passing <link id="proxy_hide_header">otherwise disabled</link> header
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1469 fields from a proxied server to a client.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1470 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1471
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1472 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1473
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1474
789
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1475 <directive name="proxy_pass_request_body">
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1476 <syntax><literal>on</literal> | <literal>off</literal></syntax>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1477 <default>on</default>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1478 <context>http</context>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1479 <context>server</context>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1480 <context>location</context>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1481
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1482 <para>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 959
diff changeset
1483 Indicates whether the original request body is passed
789
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1484 to the proxied server.
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1485 <example>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1486 location /x-accel-redirect-here/ {
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1487 proxy_method GET;
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1488 proxy_pass_request_body off;
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1489 proxy_set_header Content-Length "";
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1490
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1491 proxy_pass ...
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1492 }
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1493 </example>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1494 See also the <link id="proxy_set_header"/> and
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1495 <link id="proxy_pass_request_headers"/> directives.
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1496 </para>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1497
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1498 </directive>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1499
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1500
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1501 <directive name="proxy_pass_request_headers">
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1502 <syntax><literal>on</literal> | <literal>off</literal></syntax>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1503 <default>on</default>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1504 <context>http</context>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1505 <context>server</context>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1506 <context>location</context>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1507
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1508 <para>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 959
diff changeset
1509 Indicates whether the header fields of the original request are passed
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1510 to the proxied server.
789
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1511 <example>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1512 location /x-accel-redirect-here/ {
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1513 proxy_method GET;
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1514 proxy_pass_request_headers off;
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1515 proxy_pass_request_body off;
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1516
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1517 proxy_pass ...
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1518 }
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1519 </example>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1520 See also the <link id="proxy_set_header"/> and
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1521 <link id="proxy_pass_request_body"/> directives.
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1522 </para>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1523
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1524 </directive>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1525
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1526
1524
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1499
diff changeset
1527 <directive name="proxy_read_timeout">
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1499
diff changeset
1528 <syntax><value>time</value></syntax>
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1499
diff changeset
1529 <default>60s</default>
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1499
diff changeset
1530 <context>http</context>
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1499
diff changeset
1531 <context>server</context>
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1499
diff changeset
1532 <context>location</context>
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1499
diff changeset
1533
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1499
diff changeset
1534 <para>
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1499
diff changeset
1535 Defines a timeout for reading a response from the proxied server.
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1499
diff changeset
1536 The timeout is set only between two successive read operations,
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1499
diff changeset
1537 not for the transmission of the whole response.
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1499
diff changeset
1538 If the proxied server does not transmit anything within this time,
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1499
diff changeset
1539 the connection is closed.
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1499
diff changeset
1540 </para>
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1499
diff changeset
1541
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1499
diff changeset
1542 </directive>
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1499
diff changeset
1543
323b0d071166 Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1499
diff changeset
1544
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1545 <directive name="proxy_redirect">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1546 <syntax><literal>default</literal></syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1547 <syntax><literal>off</literal></syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1548 <syntax><value>redirect</value> <value>replacement</value></syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1549 <default>default</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1550 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1551 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1552 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1553
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1554 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1555 Sets the text that should be changed in the <header>Location</header>
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1556 and <header>Refresh</header> header fields of a proxied server response.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1557 Suppose a proxied server returned the header field
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1558 “<literal>Location: http://localhost:8000/two/some/uri/</literal>”.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1559 The directive
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1560 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1561 proxy_redirect http://localhost:8000/two/ http://frontend/one/;
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1562 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1563 will rewrite this string to
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1564 “<literal>Location: http://frontend/one/some/uri/</literal>”.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1565 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1566
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1567 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1568 A server name may be omitted in the <value>replacement</value> string:
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1569 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1570 proxy_redirect http://localhost:8000/two/ /;
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1571 </example>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1572 then the primary server’s name and port, if different from 80,
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1573 will be inserted.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1574 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1575
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1576 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1577 The default replacement specified by the <literal>default</literal> parameter
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1578 uses the parameters of the
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1579 <link doc="ngx_http_core_module.xml" id="location"/> and
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1580 <link id="proxy_pass"/> directives.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1581 Hence, the two configurations below are equivalent:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1582 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1583 location /one/ {
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1584 proxy_pass http://upstream:port/two/;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1585 proxy_redirect default;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1586 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1587
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1588 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1589 location /one/ {
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1590 proxy_pass http://upstream:port/two/;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1591 proxy_redirect http://upstream:port/two/ /one/;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1592 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1593 The <literal>default</literal> parameter is not permitted if
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1594 <link id="proxy_pass"/> is specified using variables.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1595 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1596
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1597 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1598 A <value>replacement</value> string can contain variables:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1599 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1600 proxy_redirect http://localhost:8000/ http://$host:$server_port/;
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1601 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1602 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1603
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1604 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1605 A <value>redirect</value> can also contain (1.1.11) variables:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1606 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1607 proxy_redirect http://$proxy_host:8000/ /;
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1608 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1609 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1610
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1611 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1612 The directive can be specified (1.1.11) using regular expressions.
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1613 In this case, <value>redirect</value> should either start with
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1614 the “<literal>~</literal>” symbol for a case-sensitive matching,
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1615 or with the “<literal>~*</literal>” symbols for case-insensitive
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1616 matching.
1149
1501e5848052 Corrected the usage of the definite article.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1146
diff changeset
1617 The regular expression can contain named and positional captures,
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1618 and <value>replacement</value> can reference them:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1619 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1620 proxy_redirect ~^(http://[^:]+):\d+(/.+)$ $1$2;
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1621 proxy_redirect ~*/user/([^/]+)/(.+)$ http://$1.example.com/$2;
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1622 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1623 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1624
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1625 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1626 There could be several <literal>proxy_redirect</literal> directives:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1627 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1628 proxy_redirect default;
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1629 proxy_redirect http://localhost:8000/ /;
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1630 proxy_redirect http://www.example.com/ /;
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1631 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1632 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1633
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1634 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1635 The <literal>off</literal> parameter cancels the effect of all
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1636 <literal>proxy_redirect</literal> directives on the current level:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1637 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1638 proxy_redirect off;
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1639 proxy_redirect default;
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1640 proxy_redirect http://localhost:8000/ /;
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1641 proxy_redirect http://www.example.com/ /;
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1642 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1643 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1644
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1645 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1646 Using this directive, it is also possible to add host names to relative
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1647 redirects issued by a proxied server:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1648 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1649 proxy_redirect / /;
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1650 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1651 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1652
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1653 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1654
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1655
1437
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1656 <directive name="proxy_request_buffering">
1659
680cbf783efe Fixed some misuses of "value".
Ruslan Ermilov <ru@nginx.com>
parents: 1610
diff changeset
1657 <syntax><literal>on</literal> | <literal>off</literal></syntax>
1437
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1658 <default>on</default>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1659 <context>http</context>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1660 <context>server</context>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1661 <context>location</context>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1662 <appeared-in>1.7.11</appeared-in>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1663
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1664 <para>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1665 Enables or disables buffering of a client request body.
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1666 </para>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1667
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1668 <para>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1669 When buffering is enabled, the entire request body is
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1670 <link doc="ngx_http_core_module.xml" id="client_body_buffer_size">read</link>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1671 from the client before sending the request to a proxied server.
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1672 </para>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1673
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1674 <para>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1675 When buffering is disabled, the request body is sent to the proxied server
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1676 immediately as it is received.
1440
657885fd2b96 Corrected description of proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1437
diff changeset
1677 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
1678 <link id="proxy_next_upstream">next server</link>
1437
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1679 if nginx already started sending the request body.
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1680 </para>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1681
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1682 <para>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1683 When HTTP/1.1 chunked transfer encoding is used
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1684 to send the original request body,
1440
657885fd2b96 Corrected description of proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1437
diff changeset
1685 the request body will be buffered regardless of the directive value unless
657885fd2b96 Corrected description of proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1437
diff changeset
1686 HTTP/1.1 is <link id="proxy_http_version">enabled</link> for proxying.
1437
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1687 </para>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1688
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1689 </directive>
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1690
8e7995bb8c6b Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1414
diff changeset
1691
773
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1692 <directive name="proxy_send_lowat">
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1693 <syntax><value>size</value></syntax>
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1694 <default>0</default>
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1695 <context>http</context>
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1696 <context>server</context>
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1697 <context>location</context>
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1698
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1699 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1700 If the directive is set to a non-zero value, nginx will try to
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1701 minimize the number
773
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1702 of send operations on outgoing connections to a proxied server by using either
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1703 <c-def>NOTE_LOWAT</c-def> flag of the
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1704 <link doc="../events.xml" id="kqueue"/> method,
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1705 or the <c-def>SO_SNDLOWAT</c-def> socket option,
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1706 with the specified <value>size</value>.
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1707 </para>
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1708
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1709 <para>
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1710 This directive is ignored on Linux, Solaris, and Windows.
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1711 </para>
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1712
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1713 </directive>
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1714
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1715
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1716 <directive name="proxy_send_timeout">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1717 <syntax><value>time</value></syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1718 <default>60s</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1719 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1720 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1721 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1722
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1723 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1724 Sets a timeout for transmitting a request to the proxied server.
1149
1501e5848052 Corrected the usage of the definite article.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1146
diff changeset
1725 The timeout is set only between two successive write operations,
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1726 not for the transmission of the whole request.
1149
1501e5848052 Corrected the usage of the definite article.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1146
diff changeset
1727 If the proxied server does not receive anything within this time,
1501e5848052 Corrected the usage of the definite article.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1146
diff changeset
1728 the connection is closed.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1729 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1730
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1731 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1732
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1733
787
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1734 <directive name="proxy_set_body">
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1735 <syntax><value>value</value></syntax>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1736 <default/>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1737 <context>http</context>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1738 <context>server</context>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1739 <context>location</context>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1740
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1741 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1742 Allows redefining the request body passed to the proxied server.
1151
4c2324a7eeea Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1149
diff changeset
1743 The <value>value</value> can contain text, variables, and their combination.
787
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1744 </para>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1745
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1746 </directive>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1747
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1748
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1749 <directive name="proxy_set_header">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1750 <syntax><value>field</value> <value>value</value></syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1751 <default>Host $proxy_host</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1752 <default>Connection close</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1753 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1754 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1755 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1756
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1757 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1758 Allows redefining or appending fields to the request header
789
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1759 <link id="proxy_pass_request_headers">passed</link> to the proxied server.
1151
4c2324a7eeea Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1149
diff changeset
1760 The <value>value</value> can contain text, variables, and their combinations.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1761 These directives are inherited from the previous level if and
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1762 only if there are no
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1763 <literal>proxy_set_header</literal>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1764 directives defined on the current level.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1765 By default, only two fields are redefined:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1766 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1767 proxy_set_header Host $proxy_host;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1768 proxy_set_header Connection close;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1769 </example>
1610
2d60caa1c1dd Documented headers that are stripped when caching is enabled.
Ruslan Ermilov <ru@nginx.com>
parents: 1599
diff changeset
1770 If caching is enabled, the header fields
2d60caa1c1dd Documented headers that are stripped when caching is enabled.
Ruslan Ermilov <ru@nginx.com>
parents: 1599
diff changeset
1771 <header>If-Modified-Since</header>,
2d60caa1c1dd Documented headers that are stripped when caching is enabled.
Ruslan Ermilov <ru@nginx.com>
parents: 1599
diff changeset
1772 <header>If-Unmodified-Since</header>,
2d60caa1c1dd Documented headers that are stripped when caching is enabled.
Ruslan Ermilov <ru@nginx.com>
parents: 1599
diff changeset
1773 <header>If-None-Match</header>,
2d60caa1c1dd Documented headers that are stripped when caching is enabled.
Ruslan Ermilov <ru@nginx.com>
parents: 1599
diff changeset
1774 <header>If-Match</header>,
2d60caa1c1dd Documented headers that are stripped when caching is enabled.
Ruslan Ermilov <ru@nginx.com>
parents: 1599
diff changeset
1775 <header>Range</header>,
2d60caa1c1dd Documented headers that are stripped when caching is enabled.
Ruslan Ermilov <ru@nginx.com>
parents: 1599
diff changeset
1776 and
2d60caa1c1dd Documented headers that are stripped when caching is enabled.
Ruslan Ermilov <ru@nginx.com>
parents: 1599
diff changeset
1777 <header>If-Range</header>
2d60caa1c1dd Documented headers that are stripped when caching is enabled.
Ruslan Ermilov <ru@nginx.com>
parents: 1599
diff changeset
1778 from the original request are not passed to the proxied server.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1779 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1780
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1781 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1782 An unchanged <header>Host</header> request header field can be passed like this:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1783 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1784 proxy_set_header Host $http_host;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1785 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1786 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1787
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1788 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1789 However, if this field is not present in a client request header then
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1790 nothing will be passed.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1791 In such a case it is better to use the <var>$host</var> variable&mdash;its
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1792 value equals the server name in the <header>Host</header> request header
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1793 field or the primary server name if this field is not present:
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1794 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1795 proxy_set_header Host $host;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1796 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1797 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1798
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1799 <para>
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1800 In addition, the server name can be passed together with the port of the
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1801 proxied server:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1802 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1803 proxy_set_header Host $host:$proxy_port;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1804 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1805 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1806
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1807 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1808 If the value of a header field is an empty string then this
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1809 field will not be passed to a proxied server:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1810 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1811 proxy_set_header Accept-Encoding "";
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1812 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1813 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1814
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1815 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1816
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1817
1372
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1818 <directive name="proxy_ssl_certificate">
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1819 <syntax><value>file</value></syntax>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1820 <default/>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1821 <context>http</context>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1822 <context>server</context>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1823 <context>location</context>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1824 <appeared-in>1.7.8</appeared-in>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1825
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1826 <para>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1827 Specifies a <value>file</value> with the certificate in the PEM format
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1828 used for authentication to a proxied HTTPS server.
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1829 </para>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1830
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1831 </directive>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1832
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1833
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1834 <directive name="proxy_ssl_certificate_key">
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1835 <syntax><value>file</value></syntax>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1836 <default/>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1837 <context>http</context>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1838 <context>server</context>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1839 <context>location</context>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1840 <appeared-in>1.7.8</appeared-in>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1841
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1842 <para>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1843 Specifies a <value>file</value> with the secret key in the PEM format
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1844 used for authentication to a proxied HTTPS server.
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1845 </para>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1846
1456
acba294382d6 Documented engine support in ssl_certificate_key and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1440
diff changeset
1847 <para>
acba294382d6 Documented engine support in ssl_certificate_key and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1440
diff changeset
1848 The value
acba294382d6 Documented engine support in ssl_certificate_key and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1440
diff changeset
1849 <literal>engine</literal>:<value>name</value>:<value>id</value>
acba294382d6 Documented engine support in ssl_certificate_key and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1440
diff changeset
1850 can be specified instead of the <value>file</value> (1.7.9),
acba294382d6 Documented engine support in ssl_certificate_key and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1440
diff changeset
1851 which loads a secret key with a specified <value>id</value>
acba294382d6 Documented engine support in ssl_certificate_key and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1440
diff changeset
1852 from the OpenSSL engine <value>name</value>.
acba294382d6 Documented engine support in ssl_certificate_key and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1440
diff changeset
1853 </para>
acba294382d6 Documented engine support in ssl_certificate_key and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1440
diff changeset
1854
1372
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1855 </directive>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1856
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1857
993
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1858 <directive name="proxy_ssl_ciphers">
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1859 <syntax><value>ciphers</value></syntax>
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1860 <default>DEFAULT</default>
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1861 <context>http</context>
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1862 <context>server</context>
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1863 <context>location</context>
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1864 <appeared-in>1.5.6</appeared-in>
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1865
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1866 <para>
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1867 Specifies the enabled ciphers for requests to a proxied HTTPS server.
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1868 The ciphers are specified in the format understood by the OpenSSL library.
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1869 </para>
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1870
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1871 <para>
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1872 The full list can be viewed using the
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1873 “<command>openssl ciphers</command>” command.
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1874 </para>
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1875
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1876 </directive>
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1877
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1878
1166
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1879 <directive name="proxy_ssl_crl">
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1880 <syntax><value>file</value></syntax>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1881 <default/>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1882 <context>http</context>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1883 <context>server</context>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1884 <context>location</context>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1885 <appeared-in>1.7.0</appeared-in>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1886
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1887 <para>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1888 Specifies a <value>file</value> with revoked certificates (CRL)
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1889 in the PEM format used to <link id="proxy_ssl_verify">verify</link>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1890 the certificate of the proxied HTTPS server.
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1891 </para>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1892
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1893 </directive>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1894
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1895
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1896 <directive name="proxy_ssl_name">
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1897 <syntax><value>name</value></syntax>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1898 <default>$proxy_host</default>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1899 <context>http</context>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1900 <context>server</context>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1901 <context>location</context>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1902 <appeared-in>1.7.0</appeared-in>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1903
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1904 <para>
1717
e07ce4ed4dcc Corrected usage of "allow".
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1696
diff changeset
1905 Allows overriding the server name used to
1166
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1906 <link id="proxy_ssl_verify">verify</link>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1907 the certificate of the proxied HTTPS server and to be
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1908 <link id="proxy_ssl_server_name">passed through SNI</link>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1909 when establishing a connection with the proxied HTTPS server.
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1910 </para>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1911
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1912 <para>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1913 By default, the host part of the <link id="proxy_pass"/> URL is used.
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1914 </para>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1915
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1916 </directive>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1917
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1918
1372
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1919 <directive name="proxy_ssl_password_file">
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1920 <syntax><value>file</value></syntax>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1921 <default/>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1922 <context>http</context>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1923 <context>server</context>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1924 <context>location</context>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1925 <appeared-in>1.7.8</appeared-in>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1926
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1927 <para>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1928 Specifies a <value>file</value> with passphrases for
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1929 <link id="proxy_ssl_certificate_key">secret keys</link>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1930 where each passphrase is specified on a separate line.
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1931 Passphrases are tried in turn when loading the key.
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1932 </para>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1933
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1934 </directive>
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1935
e0e1e5db06bb Documented the proxy_ssl_certificate directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1353
diff changeset
1936
1166
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1937 <directive name="proxy_ssl_server_name">
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1938 <syntax><literal>on</literal> | <literal>off</literal></syntax>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1939 <default>off</default>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1940 <context>http</context>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1941 <context>server</context>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1942 <context>location</context>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1943 <appeared-in>1.7.0</appeared-in>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1944
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1945 <para>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1946 Enables or disables passing of the server name through
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1947 <link url="http://en.wikipedia.org/wiki/Server_Name_Indication">TLS
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1948 Server Name Indication extension</link> (SNI, RFC 6066)
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1949 when establishing a connection with the proxied HTTPS server.
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1950 </para>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1951
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1952 </directive>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1953
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1954
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1955 <directive name="proxy_ssl_session_reuse">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1956 <syntax><literal>on</literal> | <literal>off</literal></syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1957 <default>on</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1958 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1959 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1960 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1961
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1962 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1963 Determines whether SSL sessions can be reused when working with
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1964 the proxied server.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1965 If the errors
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1966 “<literal>SSL3_GET_FINISHED:digest check failed</literal>”
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
1967 appear in the logs, try disabling session reuse.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1968 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1969
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1970 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1971
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1972
985
e4704604ed29 Proxy: documented the "proxy_ssl_protocols" directive.
Andrei Belov <defan@nginx.com>
parents: 966
diff changeset
1973 <directive name="proxy_ssl_protocols">
e4704604ed29 Proxy: documented the "proxy_ssl_protocols" directive.
Andrei Belov <defan@nginx.com>
parents: 966
diff changeset
1974 <syntax>
e4704604ed29 Proxy: documented the "proxy_ssl_protocols" directive.
Andrei Belov <defan@nginx.com>
parents: 966
diff changeset
1975 [<literal>SSLv2</literal>]
e4704604ed29 Proxy: documented the "proxy_ssl_protocols" directive.
Andrei Belov <defan@nginx.com>
parents: 966
diff changeset
1976 [<literal>SSLv3</literal>]
e4704604ed29 Proxy: documented the "proxy_ssl_protocols" directive.
Andrei Belov <defan@nginx.com>
parents: 966
diff changeset
1977 [<literal>TLSv1</literal>]
e4704604ed29 Proxy: documented the "proxy_ssl_protocols" directive.
Andrei Belov <defan@nginx.com>
parents: 966
diff changeset
1978 [<literal>TLSv1.1</literal>]
e4704604ed29 Proxy: documented the "proxy_ssl_protocols" directive.
Andrei Belov <defan@nginx.com>
parents: 966
diff changeset
1979 [<literal>TLSv1.2</literal>]</syntax>
1499
3687cc9a3592 Removed SSLv3 from the default value of ssl_protocols and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1456
diff changeset
1980 <default>TLSv1 TLSv1.1 TLSv1.2</default>
985
e4704604ed29 Proxy: documented the "proxy_ssl_protocols" directive.
Andrei Belov <defan@nginx.com>
parents: 966
diff changeset
1981 <context>http</context>
e4704604ed29 Proxy: documented the "proxy_ssl_protocols" directive.
Andrei Belov <defan@nginx.com>
parents: 966
diff changeset
1982 <context>server</context>
e4704604ed29 Proxy: documented the "proxy_ssl_protocols" directive.
Andrei Belov <defan@nginx.com>
parents: 966
diff changeset
1983 <context>location</context>
e4704604ed29 Proxy: documented the "proxy_ssl_protocols" directive.
Andrei Belov <defan@nginx.com>
parents: 966
diff changeset
1984 <appeared-in>1.5.6</appeared-in>
e4704604ed29 Proxy: documented the "proxy_ssl_protocols" directive.
Andrei Belov <defan@nginx.com>
parents: 966
diff changeset
1985
e4704604ed29 Proxy: documented the "proxy_ssl_protocols" directive.
Andrei Belov <defan@nginx.com>
parents: 966
diff changeset
1986 <para>
993
a59aba3d4b67 Proxy: documented the "proxy_ssl_ciphers" directive.
Andrei Belov <defan@nginx.com>
parents: 992
diff changeset
1987 Enables the specified protocols for requests to a proxied HTTPS server.
985
e4704604ed29 Proxy: documented the "proxy_ssl_protocols" directive.
Andrei Belov <defan@nginx.com>
parents: 966
diff changeset
1988 </para>
e4704604ed29 Proxy: documented the "proxy_ssl_protocols" directive.
Andrei Belov <defan@nginx.com>
parents: 966
diff changeset
1989
e4704604ed29 Proxy: documented the "proxy_ssl_protocols" directive.
Andrei Belov <defan@nginx.com>
parents: 966
diff changeset
1990 </directive>
e4704604ed29 Proxy: documented the "proxy_ssl_protocols" directive.
Andrei Belov <defan@nginx.com>
parents: 966
diff changeset
1991
e4704604ed29 Proxy: documented the "proxy_ssl_protocols" directive.
Andrei Belov <defan@nginx.com>
parents: 966
diff changeset
1992
1166
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1993 <directive name="proxy_ssl_trusted_certificate">
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1994 <syntax><value>file</value></syntax>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1995 <default/>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1996 <context>http</context>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1997 <context>server</context>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1998 <context>location</context>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
1999 <appeared-in>1.7.0</appeared-in>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2000
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2001 <para>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2002 Specifies a <value>file</value> with trusted CA certificates in the PEM format
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2003 used to <link id="proxy_ssl_verify">verify</link>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2004 the certificate of the proxied HTTPS server.
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2005 </para>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2006
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2007 </directive>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2008
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2009
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2010 <directive name="proxy_ssl_verify">
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2011 <syntax><literal>on</literal> | <literal>off</literal></syntax>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2012 <default>off</default>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2013 <context>http</context>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2014 <context>server</context>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2015 <context>location</context>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2016 <appeared-in>1.7.0</appeared-in>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2017
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2018 <para>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2019 Enables or disables verification of the proxied HTTPS server certificate.
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2020 </para>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2021
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2022 </directive>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2023
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2024
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2025 <directive name="proxy_ssl_verify_depth">
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2026 <syntax><value>number</value></syntax>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2027 <default>1</default>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2028 <context>http</context>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2029 <context>server</context>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2030 <context>location</context>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2031 <appeared-in>1.7.0</appeared-in>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2032
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2033 <para>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2034 Sets the verification depth in the proxied HTTPS server certificates chain.
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2035 </para>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2036
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2037 </directive>
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2038
1d299c6f7c49 The new directives "proxy_ssl_verify" and "proxy_ssl_server_name".
Ruslan Ermilov <ru@nginx.com>
parents: 1155
diff changeset
2039
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2040 <directive name="proxy_store">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2041 <syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2042 <literal>on</literal> |
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2043 <literal>off</literal> |
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2044 <value>string</value></syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2045 <default>off</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2046 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2047 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2048 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2049
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2050 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2051 Enables saving of files to a disk.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2052 The <literal>on</literal> parameter saves files with paths
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2053 corresponding to the directives
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2054 <link doc="ngx_http_core_module.xml" id="alias"/> or
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2055 <link doc="ngx_http_core_module.xml" id="root"/>.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2056 The <literal>off</literal> parameter disables saving of files.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2057 In addition, the file name can be set explicitly using the
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2058 <value>string</value> with variables:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2059 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2060 proxy_store /data/www$original_uri;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2061 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2062 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2063
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2064 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2065 The modification time of files is set according to the received
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2066 <header>Last-Modified</header> response header field.
1149
1501e5848052 Corrected the usage of the definite article.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1146
diff changeset
2067 The response is first written to a temporary file,
1501e5848052 Corrected the usage of the definite article.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1146
diff changeset
2068 and then the file is renamed.
959
fbb4cc6f8c3d Text review of ngx_http_proxy_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 942
diff changeset
2069 Starting from version 0.8.9, temporary files and the persistent store
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 959
diff changeset
2070 can be put on different file systems.
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 959
diff changeset
2071 However, be aware that in this case a file is copied
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 959
diff changeset
2072 across two file systems instead of the cheap renaming operation.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2073 It is thus recommended that for any given location both saved files and a
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 959
diff changeset
2074 directory holding temporary files, set by the <link id="proxy_temp_path"/>
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 959
diff changeset
2075 directive, are put on the same file system.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2076 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2077
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2078 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2079 This directive can be used to create local copies of static unchangeable
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2080 files, e.g.:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2081 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2082 location /images/ {
1005
2275611970dd Removed open_file_cache_errors from proxy_store examples.
Maxim Dounin <mdounin@mdounin.ru>
parents: 993
diff changeset
2083 root /data/www;
2275611970dd Removed open_file_cache_errors from proxy_store examples.
Maxim Dounin <mdounin@mdounin.ru>
parents: 993
diff changeset
2084 error_page 404 = /fetch$uri;
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2085 }
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2086
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2087 location /fetch/ {
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2088 internal;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2089
1005
2275611970dd Removed open_file_cache_errors from proxy_store examples.
Maxim Dounin <mdounin@mdounin.ru>
parents: 993
diff changeset
2090 proxy_pass http://backend/;
2275611970dd Removed open_file_cache_errors from proxy_store examples.
Maxim Dounin <mdounin@mdounin.ru>
parents: 993
diff changeset
2091 proxy_store on;
2275611970dd Removed open_file_cache_errors from proxy_store examples.
Maxim Dounin <mdounin@mdounin.ru>
parents: 993
diff changeset
2092 proxy_store_access user:rw group:rw all:r;
2275611970dd Removed open_file_cache_errors from proxy_store examples.
Maxim Dounin <mdounin@mdounin.ru>
parents: 993
diff changeset
2093 proxy_temp_path /data/temp;
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2094
1005
2275611970dd Removed open_file_cache_errors from proxy_store examples.
Maxim Dounin <mdounin@mdounin.ru>
parents: 993
diff changeset
2095 alias /data/www/;
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2096 }
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2097 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2098 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2099
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2100 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2101 or like this:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2102 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2103 location /images/ {
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2104 root /data/www;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2105 error_page 404 = @fetch;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2106 }
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2107
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2108 location @fetch {
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2109 internal;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2110
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2111 proxy_pass http://backend;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2112 proxy_store on;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2113 proxy_store_access user:rw group:rw all:r;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2114 proxy_temp_path /data/temp;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2115
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2116 root /data/www;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2117 }
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2118 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2119 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2120
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2121 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2122
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2123
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2124 <directive name="proxy_store_access">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2125 <syntax><value>users</value>:<value>permissions</value> ...</syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2126 <default>user:rw</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2127 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2128 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2129 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2130
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2131 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2132 Sets access permissions for newly created files and directories, e.g.:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2133 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2134 proxy_store_access user:rw group:rw all:r;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2135 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2136 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2137
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2138 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2139 If any <literal>group</literal> or <literal>all</literal> access permissions
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2140 are specified then <literal>user</literal> permissions may be omitted:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2141 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2142 proxy_store_access group:rw all:r;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2143 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2144 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2145
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2146 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2147
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2148
405
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
2149 <directive name="proxy_temp_file_write_size">
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
2150 <syntax><value>size</value></syntax>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
2151 <default>8k|16k</default>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
2152 <context>http</context>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
2153 <context>server</context>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
2154 <context>location</context>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
2155
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
2156 <para>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
2157 Limits the <value>size</value> of data written to a temporary file
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
2158 at a time, when buffering of responses from the proxied server
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
2159 to temporary files is enabled.
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
2160 By default, <value>size</value> is limited by two buffers set by the
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
2161 <link id="proxy_buffer_size"/> and <link id="proxy_buffers"/> directives.
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
2162 The maximum size of a temporary file is set by the
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
2163 <link id="proxy_max_temp_file_size"/> directive.
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
2164 </para>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
2165
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
2166 </directive>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
2167
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
2168
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2169 <directive name="proxy_temp_path">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2170 <syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2171 <value>path</value>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2172 [<value>level1</value>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2173 [<value>level2</value>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2174 [<value>level3</value>]]]</syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2175 <default>proxy_temp</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2176 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2177 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2178 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2179
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2180 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2181 Defines a directory for storing temporary files
405
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
2182 with data received from proxied servers.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2183 Up to three-level subdirectory hierarchy can be used underneath the specified
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2184 directory.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2185 For example, in the following configuration
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2186 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2187 proxy_temp_path /spool/nginx/proxy_temp 1 2;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2188 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2189 a temporary file might look like this:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2190 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2191 /spool/nginx/proxy_temp/<emphasis>7</emphasis>/<emphasis>45</emphasis>/00000123<emphasis>457</emphasis>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2192 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2193 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2194
1384
66ee77849563 Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1382
diff changeset
2195 <para>
66ee77849563 Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1382
diff changeset
2196 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
2197 <link id="proxy_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
2198 </para>
66ee77849563 Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1382
diff changeset
2199
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2200 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2201
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2202 </section>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2203
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2204
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2205 <section id="variables" name="Embedded Variables">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2206
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2207 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2208 The <literal>ngx_http_proxy_module</literal> module supports embedded variables
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2209 that can be used to compose headers using the
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2210 <link id="proxy_set_header"/> directive:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2211 <list type="tag">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2212
1155
07402a11fd8d Assigned IDs to tags describing variables.
Vladimir Homutov <vl@nginx.com>
parents: 1153
diff changeset
2213 <tag-name id="var_proxy_host"><var>$proxy_host</var></tag-name>
1298
c459ca97c14d Updated description of $proxy_host and $proxy_port variables.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1290
diff changeset
2214 <tag-desc>name and port of a proxied server as specified in the
c459ca97c14d Updated description of $proxy_host and $proxy_port variables.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1290
diff changeset
2215 <link id="proxy_pass"/> directive;</tag-desc>
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2216
1155
07402a11fd8d Assigned IDs to tags describing variables.
Vladimir Homutov <vl@nginx.com>
parents: 1153
diff changeset
2217 <tag-name id="var_proxy_port"><var>$proxy_port</var></tag-name>
1298
c459ca97c14d Updated description of $proxy_host and $proxy_port variables.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1290
diff changeset
2218 <tag-desc>port of a proxied server as specified in the
c459ca97c14d Updated description of $proxy_host and $proxy_port variables.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1290
diff changeset
2219 <link id="proxy_pass"/> directive, or the protocol’s default port;</tag-desc>
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2220
1155
07402a11fd8d Assigned IDs to tags describing variables.
Vladimir Homutov <vl@nginx.com>
parents: 1153
diff changeset
2221 <tag-name id="var_proxy_add_x_forwarded_for">
07402a11fd8d Assigned IDs to tags describing variables.
Vladimir Homutov <vl@nginx.com>
parents: 1153
diff changeset
2222 <var>$proxy_add_x_forwarded_for</var></tag-name>
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2223 <tag-desc>the <header>X-Forwarded-For</header> client request header field
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2224 with the <var>$remote_addr</var> variable appended to it, separated by a comma.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2225 If the <header>X-Forwarded-For</header> field is not present in the client
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2226 request header, the <var>$proxy_add_x_forwarded_for</var> variable is equal
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2227 to the <var>$remote_addr</var> variable.</tag-desc>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2228 </list>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2229 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2230
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2231 </section>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2232
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2233 </module>