annotate xml/en/docs/http/ngx_http_proxy_module.xml @ 790:ae776a353984

Documented "proxy_cache_methods" directive.
author Vladimir Homutov <vl@nginx.com>
date Fri, 21 Dec 2012 15:19:54 +0000
parents 1063836dacea
children 9e5847af3b2d
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"
790
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
13 rev="6">
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>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
18 The <literal>ngx_http_proxy_module</literal> module allows to pass
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">
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
43 <syntax><value>address</value></syntax>
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
44 <default/>
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
45 <context>http</context>
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
46 <context>server</context>
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
47 <context>location</context>
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
48 <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
49
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
50 <para>
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
51 Forces outgoing connections to a proxied server to originate
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
52 from the specified local IP <value>address</value>.
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
53 </para>
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
54
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
55 </directive>
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
56
ce121bf644f5 Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
57
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
58 <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
59 <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
60 <default>4k|8k</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
61 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
62 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
63 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
64
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
65 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
66 Sets <value>size</value> of the buffer used for reading the first part
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
67 of a response received from the proxied server.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
68 This part usually contains a small response header.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
69 By default, the buffer size is equal to the size of one
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
70 buffer set by the <link id="proxy_buffers"/> directive.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
71 It can be made smaller however.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
72 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
73
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
74 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
75
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
76
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
77 <directive name="proxy_buffering">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
78 <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
79 <default>on</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
80 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
81 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
82 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
83
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
84 <para>
405
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
85 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
86 </para>
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>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
89 When buffering is enabled, nginx receives 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
90 as soon as possible, saving it into buffers set by the
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
91 <link id="proxy_buffer_size"/> and <link id="proxy_buffers"/> directives.
405
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
92 If the whole response does not fit into memory, part of it can be saved
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
93 to a <link id="proxy_temp_path">temporary file</link> on disk.
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
94 Writes to temporary files are controlled by the
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
95 <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
96 <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
97 </para>
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 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
100 When buffering is disabled, a response is passed to a client synchronously,
362
db6774c4c699 Fixed translation.
Ruslan Ermilov <ru@nginx.com>
parents: 351
diff changeset
101 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
102 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
103 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
104 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
105 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
106
506
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
107 <para>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
108 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
109 “<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
110 <header>X-Accel-Buffering</header> response header field.
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
111 This ability can be disabled using the
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
112 <link doc="ngx_http_proxy_module.xml" 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
113 </para>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
114
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
115 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
116
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
117
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
118 <directive name="proxy_buffers">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
119 <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
120 <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
121 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
122 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
123 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
124
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
125 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
126 Sets the <value>number</value> and <value>size</value> of
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
127 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
128 for a single connection.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
129 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
130 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
131 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
132
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
133 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
134
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
135
405
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
136 <directive name="proxy_busy_buffers_size">
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
137 <syntax><value>size</value></syntax>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
138 <default>8k|16k</default>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
139 <context>http</context>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
140 <context>server</context>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
141 <context>location</context>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
142
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
143 <para>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
144 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
145 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
146 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
147 yet fully read.
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
148 In the mean time, the rest of the buffers can be used for reading a response
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
149 and, if needed, buffering part of a response to a temporary file.
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
150 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
151 <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
152 </para>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
153
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
154 </directive>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
155
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
156
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
157 <directive name="proxy_cache">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
158 <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
159 <default>off</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
160 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
161 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
162 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
163
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
164 <para>
575
ebcb351d9eb3 Consistently using the term "shared memory zone".
Ruslan Ermilov <ru@nginx.com>
parents: 535
diff changeset
165 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
166 The same zone can be used in several places.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
167 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
168 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
169 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
170
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
171 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
172
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
173
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
174 <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
175 <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
176 <default/>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
177 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
178 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
179 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
180
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
181 <para>
294
9f5ee1c6fca5 Use consistent wording.
Ruslan Ermilov <ru@nginx.com>
parents: 281
diff changeset
182 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
183 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
184 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
185 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
186 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
187 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
188 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
189 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
190 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
191
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
192 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
193
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 name="proxy_cache_key">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
196 <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
197 <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
198 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
199 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
200 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
201
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
202 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
203 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
204 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
205 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
206 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
207 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
208 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
209 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
210 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
211 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
212
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
213 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
214
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
215
302
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
216 <directive name="proxy_cache_lock">
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
217 <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
218 <default>off</default>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
219 <context>http</context>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
220 <context>server</context>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
221 <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
222 <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
223
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
224 <para>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
225 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
226 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
227 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
228 Other requests of the same cache element will either wait
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
229 for a response to appear in the cache, or the cache lock for
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
230 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
231 <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
232 </para>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
233
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
234 </directive>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
235
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
236
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
237 <directive name="proxy_cache_lock_timeout">
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
238 <syntax><value>time</value></syntax>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
239 <default>5s</default>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
240 <context>http</context>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
241 <context>server</context>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
242 <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
243 <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
244
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
245 <para>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
246 Sets a timeout for <link id="proxy_cache_lock"/>.
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
247 </para>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
248
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
249 </directive>
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
250
df728215db07 Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents: 297
diff changeset
251
790
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
252 <directive name="proxy_cache_methods">
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
253 <syntax>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
254 <literal>GET</literal> |
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
255 <literal>HEAD</literal> |
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
256 <literal>POST</literal>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
257 ...</syntax>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
258 <default>GET HEAD</default>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
259 <context>http</context>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
260 <context>server</context>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
261 <context>location</context>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
262 <appeared-in>0.7.59</appeared-in>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
263
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
264 <para>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
265 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
266 the response will be cached.
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
267 “<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
268 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
269 See also the <link id="proxy_no_cache"/> directive.
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
270 </para>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
271
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
272 </directive>
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
273
ae776a353984 Documented "proxy_cache_methods" directive.
Vladimir Homutov <vl@nginx.com>
parents: 789
diff changeset
274
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
275 <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
276 <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
277 <default>1</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
278 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
279 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
280 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
282 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
283 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
284 will be cached.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
285 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
286
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
287 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
288
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
289
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
290 <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
291 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
292 <value>path</value>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
293 [<literal>levels</literal>=<value>levels</value>]
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
294 <literal>keys_zone</literal>=<value>name</value>:<value>size</value>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
295 [<literal>inactive</literal>=<value>time</value>]
508
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
296 [<literal>max_size</literal>=<value>size</value>]
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
297 [<literal>loader_files</literal>=<value>number</value>]
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
298 [<literal>loader_sleep</literal>=<value>time</value>]
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
299 [<literal>loader_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
300 <default/>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
301 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
302
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
303 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
304 Sets path and other parameters of a cache.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
305 Cache data are stored in files.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
306 Both the key and file name in a cache are a result of
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
307 applying the MD5 function to the proxied URL.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
308
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
309 The <literal>levels</literal> parameter defines hierarchy levels of a cache.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
310 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
311 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
312 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
313 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
314 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
315 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
316 /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
317 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
318 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
319
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
320 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
321 A cached response is first written to a temporary file, then a file is renamed.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
322 Starting from version 0.8.9 temporary files and the cache can be put on
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
323 different file systems but be aware that in this case a file is copied
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
324 across two file systems instead of the cheap rename operation.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
325 It is thus recommended that for any given location both cache and a directory
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
326 holding temporary files set by the <link id="proxy_temp_path"/> directive
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
327 are put on the same file system.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
328 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
329
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
330 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
331 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
332 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
333 are configured by the <literal>keys_zone</literal> parameter.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
334 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
335 <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
336 regardless of their freshness.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
337 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
338 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
339
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
340 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
341 The special process “cache manager” monitors the maximum cache size set
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
342 by the <literal>max_size</literal> parameter;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
343 when this size is exceeded it removes the least recently used data.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
344 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
345
508
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
346 <para>
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
347 A minute after the start the special process “cache loader” is activated
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
348 that loads information about previously cached data stored on file system
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
349 into a cache zone.
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
350 A load is done in iterations.
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
351 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
352 are loaded (by default, 100).
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
353 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
354 <literal>loader_threshold</literal> parameter (by default, 200 milliseconds).
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
355 A pause is made between iterations, configured by the
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
356 <literal>loader_sleep</literal> parameter (by default, 50 milliseconds).
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
357 </para>
5e332fafd228 Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents: 506
diff changeset
358
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
359 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
360
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
361
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
362 <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
363 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
364 <literal>error</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
365 <literal>timeout</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
366 <literal>invalid_header</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
367 <literal>updating</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
368 <literal>http_500</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
369 <literal>http_502</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
370 <literal>http_503</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
371 <literal>http_504</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
372 <literal>http_404</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
373 <literal>off</literal>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
374 ...</syntax>
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
375 <default>off</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
376 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
377 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
378 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
379
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
380 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
381 If an error occurs while working with the proxied server it is possible
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
382 to use a stale cached response.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
383 This directives determines in which cases it is permitted.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
384 The directive’s parameters match those of the
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
385 <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
386 </para>
695f83494c19 Emphasized on what the "updating" parameter of the "proxy_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents: 417
diff changeset
387
695f83494c19 Emphasized on what the "updating" parameter of the "proxy_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents: 417
diff changeset
388 <para>
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
389 Additionally, the <literal>updating</literal> parameter permits
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
390 to use a stale cached response if it is currently being updated.
504
695f83494c19 Emphasized on what the "updating" parameter of the "proxy_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents: 417
diff changeset
391 This allows to minimize the number of accesses to proxied servers
695f83494c19 Emphasized on what the "updating" parameter of the "proxy_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents: 417
diff changeset
392 when updating cached data.
695f83494c19 Emphasized on what the "updating" parameter of the "proxy_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents: 417
diff changeset
393 </para>
695f83494c19 Emphasized on what the "updating" parameter of the "proxy_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents: 417
diff changeset
394
695f83494c19 Emphasized on what the "updating" parameter of the "proxy_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents: 417
diff changeset
395 <para>
695f83494c19 Emphasized on what the "updating" parameter of the "proxy_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents: 417
diff changeset
396 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
397 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
398 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
399 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
400
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
401 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
402
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
403
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
404 <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
405 <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
406 <default/>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
407 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
408 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
409 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
410
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
411 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
412 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
413 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
414 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
415 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
416 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
417 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
418 set 10 minutes of caching for responses with codes 200 and 302,
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
419 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
420 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
421
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
422 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
423 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
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_valid 5m;
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 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
428 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
429
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
430 <para>
294
9f5ee1c6fca5 Use consistent wording.
Ruslan Ermilov <ru@nginx.com>
parents: 281
diff changeset
431 In addition, it can be specified to cache any responses using the
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
432 <literal>any</literal> parameter:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
433 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
434 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
435 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
436 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
437 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
438 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
439
506
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
440 <para>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
441 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
442 in the response header.
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
443 This has a higher precedence than setting of caching time using the directive.
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
444 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
445 response in seconds.
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
446 The value 0 disables to cache a response.
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
447 If a value starts with the prefix <literal>@</literal>, it sets an absolute
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
448 time in seconds since Epoch, up to which the response may be cached.
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
449 If header does not include the <header>X-Accel-Expires</header> field,
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
450 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
451 <header>Expires</header> or <header>Cache-Control</header>.
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
452 If a header includes the <header>Set-Cookie</header> field, such a
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
453 response will not be cached.
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
454 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
455 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
456 </para>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
457
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
458 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
459
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
460
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
461 <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
462 <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
463 <default>60s</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
464 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
465 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
466 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
467
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
468 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
469 Defines a timeout for establishing a connection with the proxied server.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
470 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
471 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
472
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
473 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
474
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
475
417
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
476 <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
477 <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
478 <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
479 <default>off</default>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
480 <context>http</context>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
481 <context>server</context>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
482 <context>location</context>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
483 <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
484
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
485 <para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
486 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
487 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
488 proxied server response.
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
489 Suppose a proxied server returned the header field
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
490 <header>Set-Cookie</header> with the attribute
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
491 “<literal>domain=localhost</literal>”.
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
492 The directive
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
493 <example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
494 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
495 </example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
496 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
497 “<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
498 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
499
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
500 <para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
501 A dot at the beginning of the <value>domain</value> and
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
502 <value>replacement</value> strings, and the <literal>domain</literal>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
503 attribute is ignored.
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
504 Matching is case-insensitive.
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
505 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
506
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
507 <para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
508 The strings <value>domain</value> and <value>replacement</value>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
509 can contain variables:
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
510 <example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
511 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
512 </example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
513 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
514
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
515 <para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
516 A directive can also be specified using regular expressions.
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
517 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
518 the “<literal>~</literal>” symbol.
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
519 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
520 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
521 <example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
522 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
523 </example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
524 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
525
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
526 <para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
527 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
528 <example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
529 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
530 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
531 </example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
532 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
533
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
534 <para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
535 The <literal>off</literal> parameter cancels all
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
536 <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
537 <example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
538 proxy_cookie_domain off;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
539 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
540 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
541 </example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
542 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
543
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
544 </directive>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
545
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
546
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
547 <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
548 <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
549 <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
550 <default>off</default>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
551 <context>http</context>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
552 <context>server</context>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
553 <context>location</context>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
554 <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
555
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
556 <para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
557 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
558 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
559 proxied server response.
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
560 Suppose a proxied server returned the header field
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
561 <header>Set-Cookie</header> with the attribute
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
562 “<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
563 The directive
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
564 <example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
565 proxy_cookie_path /two/ /;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
566 </example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
567 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
568 “<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
569 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
570
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
571 <para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
572 The strings <value>path</value> and <value>replacement</value>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
573 can contain variables:
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
574 <example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
575 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
576 </example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
577 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
578
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
579 <para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
580 A directive can also be specified using regular expressions.
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
581 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
582 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
583 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
584 matching.
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
585 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
586 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
587 <example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
588 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
589 </example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
590 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
591
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
592 <para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
593 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
594 <example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
595 proxy_cookie_path /one/ /;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
596 proxy_cookie_path / /two/;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
597 </example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
598 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
599
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
600 <para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
601 The <literal>off</literal> parameter cancels all
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
602 <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
603 <example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
604 proxy_cookie_path off;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
605 proxy_cookie_path /two/ /;
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
606 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
607 </example>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
608 </para>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
609
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
610 </directive>
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
611
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
612
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
613 <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
614 <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
615 <default/>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
616 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
617 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
618 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
619
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
620 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
621 By default,
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
622 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
623 <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
624 <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
625 server to a client.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
626 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
627 that will not be passed.
294
9f5ee1c6fca5 Use consistent wording.
Ruslan Ermilov <ru@nginx.com>
parents: 281
diff changeset
628 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
629 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
630 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
631
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
632 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
633
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
634
316
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
635 <directive name="proxy_http_version">
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
636 <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
637 <default>1.0</default>
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
638 <context>http</context>
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
639 <context>server</context>
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
640 <context>location</context>
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
641 <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
642
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
643 <para>
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
644 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
645 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
646 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
647 <link doc="ngx_http_upstream_module.xml" id="keepalive"/>
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
648 connections.
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
649 </para>
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
650
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
651 </directive>
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
652
1fb1c077658b Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents: 310
diff changeset
653
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
654 <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
655 <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
656 <default>off</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
657 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
658 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
659 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
660
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
661 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
662 Determines should the connection with a proxied server be
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
663 closed if a client closes a connection without waiting
294
9f5ee1c6fca5 Use consistent wording.
Ruslan Ermilov <ru@nginx.com>
parents: 281
diff changeset
664 for a response.
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
665 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
666
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
667 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
668
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
669
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
670 <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
671 <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
672 <default/>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
673 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
674 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
675 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
676
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
677 <para>
294
9f5ee1c6fca5 Use consistent wording.
Ruslan Ermilov <ru@nginx.com>
parents: 281
diff changeset
678 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
679 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
680 <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
681 <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
682 <header>X-Accel-Charset</header> (1.1.6), <header>Expires</header>,
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
683 <header>Cache-Control</header>, and <header>Set-Cookie</header> (0.8.44).
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
684 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
685
506
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
686 <para>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
687 If not disabled, processing of these header fields has the following effect:
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
688 <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
689
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
690 <listitem>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
691 <header>X-Accel-Expires</header>, <header>Expires</header>,
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
692 <header>Cache-Control</header>, and <header>Set-Cookie</header>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
693 set parameters of response <link id="proxy_cache_valid">caching</link>;
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
694 </listitem>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
695
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
696 <listitem>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
697 <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
698 <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
699 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
700 </listitem>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
701
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
702 <listitem>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
703 <header>X-Accel-Limit-Rate</header> sets a
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
704 <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
705 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
706 </listitem>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
707
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
708 <listitem>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
709 <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
710 <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
711 </listitem>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
712
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
713 <listitem>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
714 <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
715 <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
716 of a response.
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
717 </listitem>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
718
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
719 </list>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
720 </para>
657848837328 Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents: 504
diff changeset
721
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
722 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
723
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
724
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
725 <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
726 <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
727 <default>off</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
728 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
729 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
730 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
731
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
732 <para>
297
94c8df379088 Added missing word.
Ruslan Ermilov <ru@nginx.com>
parents: 294
diff changeset
733 Determines whether proxied responses with codes greater than or equal
94c8df379088 Added missing word.
Ruslan Ermilov <ru@nginx.com>
parents: 294
diff changeset
734 to 400 should be passed to a client or be redirected to nginx for processing
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
735 using the <link doc="ngx_http_core_module.xml" id="error_page"/> directive.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
736 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
737
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
738 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
739
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
740
405
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
741 <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
742 <syntax><value>size</value></syntax>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
743 <default>1024m</default>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
744 <context>http</context>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
745 <context>server</context>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
746 <context>location</context>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
747
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
748 <para>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
749 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
750 server is enabled, and the whole response does not fit into memory buffers
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
751 set by the <link id="proxy_buffer_size"/> and <link id="proxy_buffers"/>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
752 directives, part of a response can be saved to a temporary file.
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
753 This directive sets the maximum <value>size</value> of a temporary file.
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
754 The size of data written to a temporary file at a time is set
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
755 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
756 </para>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
757
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
758 <para>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
759 Value of zero disables buffering of responses to temporary files.
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
760 </para>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
761
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
762 </directive>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
763
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
764
787
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
765 <directive name="proxy_method">
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
766 <syntax><value>method</value></syntax>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
767 <default/>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
768 <context>http</context>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
769 <context>server</context>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
770 <context>location</context>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
771
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
772 <para>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
773 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
774 to the proxied server instead of the method from the client request.
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
775 </para>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
776
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
777 </directive>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
778
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
779
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
780 <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
781 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
782 <literal>error</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
783 <literal>timeout</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
784 <literal>invalid_header</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
785 <literal>http_500</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
786 <literal>http_502</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
787 <literal>http_503</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
788 <literal>http_504</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
789 <literal>http_404</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
790 <literal>off</literal>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 362
diff changeset
791 ...</syntax>
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
792 <default>error timeout</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
793 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
794 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
795 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
796
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
797 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
798 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
799 <list type="tag">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
800
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
801 <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
802 <tag-desc>an error occurred while establishing a connection with the
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
803 server, passing it a request, or reading the response header;</tag-desc>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
804
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
805 <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
806 <tag-desc>a timeout has occurred while establishing a connection with the
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
807 server, passing it a request, or reading the response header;</tag-desc>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
808
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
809 <tag-name><literal>invalid_header</literal></tag-name>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
810 <tag-desc>a server returned empty or invalid response;</tag-desc>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
811
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
812 <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
813 <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
814
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
815 <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
816 <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
817
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
818 <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
819 <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
820
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
821 <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
822 <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
823
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
824 <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
825 <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
826
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
827 <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
828 <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
829
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
830 </list>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
831 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
832
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
833 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
834 It should be understood that passing a request to the next server is
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
835 only possible if a client was not sent anything yet.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
836 That is, if an error or a timeout occurs in the middle of
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
837 transferring a response, fixing this is impossible.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
838 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
839
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
840 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
841
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
842
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
843 <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
844 <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
845 <default/>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
846 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
847 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
848 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
849
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
850 <para>
294
9f5ee1c6fca5 Use consistent wording.
Ruslan Ermilov <ru@nginx.com>
parents: 281
diff changeset
851 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
852 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
853 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
854 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
855 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
856 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
857 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
858 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
859 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
860
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
861 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
862
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
863
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
864 <directive name="proxy_pass">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
865 <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
866 <default/>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
867 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
868 <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
869 <context>limit_except</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
870
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
871 <para>
535
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
872 Sets the protocol and address of a proxied server, and an optional URI
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
873 to which a location should be mapped.
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
874 A protocol can be specified as
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
875 “<literal>http</literal>” or “<literal>https</literal>”.
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
876 An address can be specified as a domain name or IP address,
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
877 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
878 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
879 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
880 </example>
535
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
881 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
882 “<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
883 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
884 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
885 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
886 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
887
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
888 <para>
294
9f5ee1c6fca5 Use consistent wording.
Ruslan Ermilov <ru@nginx.com>
parents: 281
diff changeset
889 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
890 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
891 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
892 <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
893 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
894
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
895 <para>
535
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
896 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
897 <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
898
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
899 <listitem>
535
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
900 If <literal>proxy_pass</literal> is specified with URI,
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
901 when passing a request to the server, part of a
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
902 <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
903 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
904 specified in the directive:
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
905 <example>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
906 location /name/ {
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
907 proxy_pass http://127.0.0.1/remote/;
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
908 }
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
909 </example>
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
910 </listitem>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
911
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
912 <listitem>
535
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
913 If <literal>proxy_pass</literal> is specified without URI,
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
914 a request URI is passed to the server in the same form
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
915 as sent by a client when processing an original request,
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
916 or the full normalized request URI is passed
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
917 when processing the changed URI:
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
918 <example>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
919 location /some/path/ {
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
920 proxy_pass http://127.0.0.1;
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
921 }
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
922 </example>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
923 <note>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
924 Before version 1.1.12,
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
925 if <literal>proxy_pass</literal> is specified without a URI,
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
926 an original request URI might be passed
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
927 instead of the changed URI in some cases.
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
928 </note>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
929 </listitem>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
930 </list>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
931 </para>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
932
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
933 <para>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
934 In some cases, part of a request URI to be replaced cannot be determined:
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
935 <list type="bullet" compact="no">
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
936
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
937 <listitem>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
938 When location is specified using a regular expression.
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
939 <para>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
940 In this case, the directive should be specified without URI.
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
941 </para>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
942 </listitem>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
943
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
944 <listitem>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
945 When URI is changed inside a proxied location using the
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
946 <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
947 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
948 (<literal>break</literal>):
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
949 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
950 location /name/ {
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
951 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
952 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
953 }
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
954 </example>
535
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
955 <para>
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
956 In this case, a URI specified in the directive is ignored and
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
957 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
958 </para>
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
959 </listitem>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
960 </list>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
961 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
962
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
963 <para>
535
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
964 A server name, its port and passed URI can also be specified using variables:
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
965 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
966 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
967 </example>
535
f8652d663b62 Revised description of "proxy_pass".
Ruslan Ermilov <ru@nginx.com>
parents: 508
diff changeset
968 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
969 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
970 proxy_pass $request;
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
971 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
972 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
973
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
974 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
975 In this case the server name is searched among the described
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
976 <link doc="ngx_http_upstream_module.xml">server groups</link>,
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
977 and if not found is determined using a
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
978 <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
979 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
980
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
981 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
982
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 <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
985 <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
986 <default/>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
987 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
988 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
989 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
990
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
991 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
992 Permits to pass <link id="proxy_hide_header">otherwise disabled</link> header
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
993 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
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
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
999 <directive name="proxy_read_timeout">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1000 <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
1001 <default>60s</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1002 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1003 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1004 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1005
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1006 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1007 Defines a timeout 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
1008 A timeout is only set between two successive read operations,
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1009 not for the transmission of the whole response.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1010 If a proxied server does not transmit anything within this time,
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1011 a connection is closed.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1012 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1013
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1014 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1015
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1016
789
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1017 <directive name="proxy_pass_request_body">
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1018 <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
1019 <default>on</default>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1020 <context>http</context>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1021 <context>server</context>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1022 <context>location</context>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1023
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1024 <para>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1025 If disabled, the original request body will not be passed
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1026 to the proxied server.
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1027 <example>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1028 location /x-accel-redirect-here/ {
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1029 proxy_method GET;
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1030 proxy_pass_request_body off;
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1031 proxy_set_header Content-Length "";
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1032
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1033 proxy_pass ...
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1034 }
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1035 </example>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1036 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
1037 <link id="proxy_pass_request_headers"/> directives.
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1038 </para>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1039
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1040 </directive>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1041
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1042
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1043 <directive name="proxy_pass_request_headers">
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1044 <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
1045 <default>on</default>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1046 <context>http</context>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1047 <context>server</context>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1048 <context>location</context>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1049
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1050 <para>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1051 If disabled, header fields of the original request will not be passed to the
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1052 proxied server.
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1053 <example>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1054 location /x-accel-redirect-here/ {
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1055 proxy_method GET;
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1056 proxy_pass_request_headers off;
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1057 proxy_pass_request_body off;
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1058
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1059 proxy_pass ...
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1060 }
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1061 </example>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1062 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
1063 <link id="proxy_pass_request_body"/> directives.
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1064 </para>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1065
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1066 </directive>
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1067
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1068
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1069 <directive name="proxy_redirect">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1070 <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
1071 <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
1072 <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
1073 <default>default</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1074 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1075 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1076 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1077
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1078 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1079 Sets a text that should be changed in the header fields
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1080 <header>Location</header> and <header>Refresh</header> of a response
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1081 from the proxied server.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1082 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
1083 “<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
1084 The directive
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1085 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1086 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
1087 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1088 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
1089 “<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
1090 </para>
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 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1093 A server name may be omitted from the <value>replacement</value> string:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1094 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1095 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
1096 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1097 then the primary server’s name and a port, if different from 80,
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1098 will be substituted.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1099 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1100
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1101 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1102 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
1103 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
1104 <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
1105 <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
1106 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
1107 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1108 location /one/ {
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1109 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
1110 proxy_redirect default;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1111 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1112
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1113 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1114 location /one/ {
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1115 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
1116 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
1117 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1118 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
1119 <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
1120 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1121
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1122 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1123 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
1124 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1125 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
1126 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1127 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1128
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1129 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1130 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
1131 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1132 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
1133 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1134 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1135
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1136 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1137 A directive can be specified (1.1.11) using regular expressions.
417
cbc2d1b51cb6 Documented the proxy_cookie_domain and proxy_cookie_path directives.
Ruslan Ermilov <ru@nginx.com>
parents: 405
diff changeset
1138 In this case, <value>redirect</value> should either start from
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1139 the “<literal>~</literal>” symbol for a case-sensitive matching,
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1140 or from the “<literal>~*</literal>” symbols for case-insensitive
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1141 matching.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1142 A regular expression can contain named and positional captures,
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1143 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
1144 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1145 proxy_redirect ~^(http://[^:]+):\d+(/.+)$ $1$2;
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1146 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
1147 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1148 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1149
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1150 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1151 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
1152 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1153 proxy_redirect default;
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1154 proxy_redirect http://localhost:8000/ /;
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1155 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
1156 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1157 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1158
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1159 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1160 The <literal>off</literal> parameter cancels all
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1161 <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
1162 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1163 proxy_redirect off;
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1164 proxy_redirect default;
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1165 proxy_redirect http://localhost:8000/ /;
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1166 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
1167 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1168 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1169
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1170 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1171 Using this directive it is also possible to add host names to relative
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1172 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
1173 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 316
diff changeset
1174 proxy_redirect / /;
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1175 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1176 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1177
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1178 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1179
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1180
773
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1181 <directive name="proxy_send_lowat">
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1182 <syntax><value>size</value></syntax>
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1183 <default>0</default>
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1184 <context>http</context>
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1185 <context>server</context>
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1186 <context>location</context>
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1187
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1188 <para>
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1189 If set to a non-zero value, nginx will try to minimize the number
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1190 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
1191 <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
1192 <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
1193 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
1194 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
1195 </para>
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1196
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1197 <para>
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1198 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
1199 </para>
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1200
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1201 </directive>
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1202
24b1b0101250 Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents: 772
diff changeset
1203
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1204 <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
1205 <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
1206 <default>60s</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1207 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1208 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1209 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1210
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1211 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1212 Sets a timeout for transmitting a request to the proxied server.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1213 A timeout is only set between two successive write operations,
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1214 not for the transmission of the whole request.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1215 If a proxied server does not receive anything within this time,
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1216 a connection is closed.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1217 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1218
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1219 </directive>
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
787
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1222 <directive name="proxy_set_body">
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1223 <syntax><value>value</value></syntax>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1224 <default/>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1225 <context>http</context>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1226 <context>server</context>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1227 <context>location</context>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1228
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1229 <para>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1230 Allows to redefine request body passed to the proxied server.
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1231 A <value>value</value> can contain text, variables, and their combination.
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1232 </para>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1233
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1234 </directive>
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1235
180a64c709d8 Documented "proxy_set_body" and "proxy_method" directives.
Vladimir Homutov <vl@nginx.com>
parents: 773
diff changeset
1236
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1237 <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
1238 <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
1239 <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
1240 <default>Connection close</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1241 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1242 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1243 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1244
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1245 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1246 Allows to redefine or append fields to the request header
789
1063836dacea Documented "proxy_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents: 787
diff changeset
1247 <link id="proxy_pass_request_headers">passed</link> 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
1248 A <value>value</value> can contain text, variables, and their combination.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1249 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
1250 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
1251 <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
1252 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
1253 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
1254 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1255 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
1256 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
1257 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1258 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1259
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1260 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1261 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
1262 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1263 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
1264 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1265 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1266
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1267 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1268 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
1269 nothing will be passed.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1270 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
1271 value equals the server name in the <header>Host</header> request header
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1272 field, or the primary server name if this field is not present:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1273 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1274 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
1275 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1276 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1277
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1278 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1279 In addition, a server name can be passed together with a port of the
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1280 proxied server:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1281 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1282 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
1283 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1284 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1285
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1286 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1287 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
1288 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
1289 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1290 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
1291 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1292 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1293
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1294 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1295
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1296
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1297 <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
1298 <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
1299 <default>on</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1300 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1301 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1302 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1303
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1304 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1305 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
1306 the proxied server.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1307 If the errors
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1308 “<literal>SSL3_GET_FINISHED:digest check failed</literal>”
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1309 appear in the logs, try to disable session reuse.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1310 </para>
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 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1313
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1314
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1315 <directive name="proxy_store">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1316 <syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1317 <literal>on</literal> |
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1318 <literal>off</literal> |
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1319 <value>string</value></syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1320 <default>off</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1321 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1322 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1323 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1324
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1325 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1326 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
1327 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
1328 corresponding to the directives
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1329 <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
1330 <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
1331 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
1332 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
1333 <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
1334 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1335 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
1336 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1337 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1338
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1339 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1340 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
1341 <header>Last-Modified</header> response header field.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1342 A response is first written to a temporary file, then a file is renamed.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1343 Starting from version 0.8.9 temporary files and the persistent store
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1344 can be put on different file systems but be aware that in this case
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1345 a file is copied across two file systems instead of the cheap rename operation.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1346 It is thus recommended that for any given location both saved files and a
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1347 directory holding temporary files set by the <link id="proxy_temp_path"/>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1348 directive are put on the same file system.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1349 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1350
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1351 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1352 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
1353 files, e.g.:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1354 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1355 location /images/ {
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1356 root /data/www;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1357 open_file_cache_errors off;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1358 error_page 404 = /fetch$uri;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1359 }
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1360
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1361 location /fetch/ {
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1362 internal;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1363
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1364 proxy_pass http://backend/;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1365 proxy_store on;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1366 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
1367 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
1368
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1369 alias /data/www/;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1370 }
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1371 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1372 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1373
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1374 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1375 or like this:
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1376 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1377 location /images/ {
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1378 root /data/www;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1379 error_page 404 = @fetch;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1380 }
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 location @fetch {
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1383 internal;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1384
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1385 proxy_pass http://backend;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1386 proxy_store on;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1387 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
1388 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
1389
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1390 root /data/www;
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1391 }
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1392 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1393 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1394
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1395 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1396
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1397
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1398 <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
1399 <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
1400 <default>user:rw</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1401 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1402 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1403 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1404
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1405 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1406 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
1407 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1408 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
1409 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1410 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1411
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1412 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1413 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
1414 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
1415 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1416 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
1417 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1418 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1419
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1420 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1421
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1422
405
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1423 <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
1424 <syntax><value>size</value></syntax>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1425 <default>8k|16k</default>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1426 <context>http</context>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1427 <context>server</context>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1428 <context>location</context>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1429
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1430 <para>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1431 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
1432 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
1433 to temporary files is enabled.
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1434 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
1435 <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
1436 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
1437 <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
1438 </para>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1439
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1440 </directive>
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1441
781b23ba3b0a Documented the following directives: proxy_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
1442
281
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1443 <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
1444 <syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1445 <value>path</value>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1446 [<value>level1</value>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1447 [<value>level2</value>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1448 [<value>level3</value>]]]</syntax>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1449 <default>proxy_temp</default>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1450 <context>http</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1451 <context>server</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1452 <context>location</context>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1453
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1454 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1455 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
1456 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
1457 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
1458 directory.
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1459 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
1460 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1461 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
1462 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1463 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
1464 <example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1465 /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
1466 </example>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1467 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1468
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1469 </directive>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1470
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1471 </section>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1472
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 <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
1475
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1476 <para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1477 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
1478 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
1479 <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
1480 <list type="tag">
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1481
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1482 <tag-name><var>$proxy_host</var></tag-name>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1483 <tag-desc>name and port of a proxied server;</tag-desc>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1484
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1485 <tag-name><var>$proxy_port</var></tag-name>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1486 <tag-desc>port of a proxied server;</tag-desc>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1487
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1488 <tag-name><var>$proxy_add_x_forwarded_for</var></tag-name>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1489 <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
1490 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
1491 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
1492 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
1493 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
1494 </list>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1495 </para>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1496
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1497 </section>
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1498
7142ddd2764c Translated current version of ngx_http_proxy_module documentation into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1499 </module>