Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_mirror_module.xml @ 2016:e6de97d14f81
Documented the mirror module.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Fri, 04 Aug 2017 18:24:38 +0300 |
parents | |
children | 03538fa2acfe |
comparison
equal
deleted
inserted
replaced
2015:75cb57264e52 | 2016:e6de97d14f81 |
---|---|
1 <?xml version="1.0"?> | |
2 | |
3 <!-- | |
4 Copyright (C) Nginx, Inc. | |
5 --> | |
6 | |
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | |
8 | |
9 <module name="Module ngx_http_mirror_module" | |
10 link="/en/docs/http/ngx_http_mirror_module.html" | |
11 lang="en" | |
12 rev="1"> | |
13 | |
14 <section id="summary"> | |
15 | |
16 <para> | |
17 The <literal>ngx_http_mirror_module</literal> module (1.13.4) implements | |
18 mirroring of an original request | |
19 by creating background mirror subrequests. | |
20 The output of mirror subrequests is ignored. | |
21 </para> | |
22 | |
23 </section> | |
24 | |
25 | |
26 <section id="example" name="Example Configuration"> | |
27 | |
28 <para> | |
29 <example> | |
30 location / { | |
31 mirror /mirror; | |
32 proxy_pass http://backend; | |
33 } | |
34 | |
35 location /mirror { | |
36 internal; | |
37 proxy_pass http://test_backend$request_uri; | |
38 } | |
39 </example> | |
40 </para> | |
41 | |
42 </section> | |
43 | |
44 | |
45 <section id="directives" name="Directives"> | |
46 | |
47 <directive name="mirror"> | |
48 <syntax><value>uri</value> | <literal>off</literal></syntax> | |
49 <default>off</default> | |
50 <context>http</context> | |
51 <context>server</context> | |
52 <context>location</context> | |
53 | |
54 <para> | |
55 Sets the URI to which an original request will be mirrored. | |
56 Several mirrors can be specified on the same level. | |
57 </para> | |
58 | |
59 </directive> | |
60 | |
61 | |
62 <directive name="mirror_request_body"> | |
63 <syntax><literal>on</literal> | <literal>off</literal></syntax> | |
64 <default>on</default> | |
65 <context>http</context> | |
66 <context>server</context> | |
67 <context>location</context> | |
68 | |
69 <para> | |
70 Indicates whether the client request body is mirrored. | |
71 When enabled, the client request body will be read | |
72 prior to creating mirror subrequests. | |
73 In this case, unbuffered client request body proxying | |
74 set by | |
75 <link doc="ngx_http_proxy_module.xml" id="proxy_request_buffering">proxy_request_bufferning</link>, | |
76 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_request_buffering">fastcgi_request_bufferning</link>, | |
77 <link doc="ngx_http_scgi_module.xml" id="scgi_request_buffering">scgi_request_bufferning</link>, | |
78 and | |
79 <link doc="ngx_http_uwsgi_module.xml" id="uwsgi_request_buffering">uwsgi_request_bufferning</link> | |
80 directives will be disabled. | |
81 <example> | |
82 location / { | |
83 mirror /mirror; | |
84 mirror_request_body off; | |
85 proxy_pass http://backend; | |
86 } | |
87 | |
88 location /mirror { | |
89 internal; | |
90 proxy_pass http://log_backend; | |
91 proxy_pass_request_body off; | |
92 proxy_set_header Content-Length ""; | |
93 proxy_set_header X-Original-URI $request_uri; | |
94 } | |
95 </example> | |
96 </para> | |
97 | |
98 </directive> | |
99 | |
100 </section> | |
101 | |
102 </module> |