Mercurial > hg > nginx-site
annotate xml/en/docs/http/ngx_http_v2_module.xml @ 1704:792478434bb1
Documented the $proxy_protocol_port variable.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 24 May 2016 20:19:12 +0300 |
parents | 5154b356a1b2 |
children | ea60a7dff3c1 |
rev | line source |
---|---|
1566 | 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_v2_module" | |
10 link="/en/docs/http/ngx_http_v2_module.html" | |
11 lang="en" | |
1671
5154b356a1b2
Unbuffered request body upload support in http2.
Ruslan Ermilov <ru@nginx.com>
parents:
1666
diff
changeset
|
12 rev="6"> |
1566 | 13 |
14 <section id="summary"> | |
15 | |
16 <para> | |
17 The <literal>ngx_http_v2_module</literal> module (1.9.5) provides | |
18 support for <link url="https://tools.ietf.org/html/rfc7540">HTTP/2</link> | |
19 and supersedes the | |
20 <link doc="ngx_http_spdy_module.xml">ngx_http_spdy_module</link> module. | |
21 </para> | |
22 | |
23 <para> | |
24 This module is not built by default, it should be enabled with | |
25 the <literal>--with-http_v2_module</literal> | |
26 configuration parameter. | |
27 </para> | |
28 | |
29 </section> | |
30 | |
31 | |
1580
c711a8a1a8f9
Changed ID from "bugs" to "issues" for http/2, perl, spdy.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1577
diff
changeset
|
32 <section id="issues" name="Known Issues"> |
1577
37be36b01d28
Added the "Known issues" section to the ngx_http_v2 module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1568
diff
changeset
|
33 |
37be36b01d28
Added the "Known issues" section to the ngx_http_v2 module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1568
diff
changeset
|
34 <para> |
37be36b01d28
Added the "Known issues" section to the ngx_http_v2 module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1568
diff
changeset
|
35 The module is experimental, caveat emptor applies. |
37be36b01d28
Added the "Known issues" section to the ngx_http_v2 module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1568
diff
changeset
|
36 </para> |
37be36b01d28
Added the "Known issues" section to the ngx_http_v2 module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1568
diff
changeset
|
37 |
37be36b01d28
Added the "Known issues" section to the ngx_http_v2 module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1568
diff
changeset
|
38 <para> |
1671
5154b356a1b2
Unbuffered request body upload support in http2.
Ruslan Ermilov <ru@nginx.com>
parents:
1666
diff
changeset
|
39 Before version 1.9.14, |
5154b356a1b2
Unbuffered request body upload support in http2.
Ruslan Ermilov <ru@nginx.com>
parents:
1666
diff
changeset
|
40 buffering of a client request body could not be disabled |
1577
37be36b01d28
Added the "Known issues" section to the ngx_http_v2 module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1568
diff
changeset
|
41 regardless of |
37be36b01d28
Added the "Known issues" section to the ngx_http_v2 module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1568
diff
changeset
|
42 <link doc="ngx_http_proxy_module.xml" id="proxy_request_buffering"/>, |
37be36b01d28
Added the "Known issues" section to the ngx_http_v2 module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1568
diff
changeset
|
43 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_request_buffering"/>, |
37be36b01d28
Added the "Known issues" section to the ngx_http_v2 module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1568
diff
changeset
|
44 <link doc="ngx_http_uwsgi_module.xml" id="uwsgi_request_buffering"/>, and |
37be36b01d28
Added the "Known issues" section to the ngx_http_v2 module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1568
diff
changeset
|
45 <link doc="ngx_http_scgi_module.xml" id="scgi_request_buffering"/> |
37be36b01d28
Added the "Known issues" section to the ngx_http_v2 module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1568
diff
changeset
|
46 directive values. |
37be36b01d28
Added the "Known issues" section to the ngx_http_v2 module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1568
diff
changeset
|
47 </para> |
37be36b01d28
Added the "Known issues" section to the ngx_http_v2 module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1568
diff
changeset
|
48 |
37be36b01d28
Added the "Known issues" section to the ngx_http_v2 module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1568
diff
changeset
|
49 </section> |
37be36b01d28
Added the "Known issues" section to the ngx_http_v2 module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1568
diff
changeset
|
50 |
37be36b01d28
Added the "Known issues" section to the ngx_http_v2 module.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1568
diff
changeset
|
51 |
1566 | 52 <section id="example" name="Example Configuration"> |
53 | |
54 <para> | |
55 <example> | |
56 server { | |
57 listen 443 ssl http2; | |
58 | |
59 ssl_certificate server.crt; | |
60 ssl_certificate_key server.key; | |
61 } | |
62 </example> | |
1568
61a3285d77aa
Paraphrased the ALPN/NPN requirements note so it makes sense.
Ruslan Ermilov <ru@nginx.com>
parents:
1566
diff
changeset
|
63 Note that accepting HTTP/2 connections over TLS requires |
1566 | 64 the “Application-Layer Protocol Negotiation” (ALPN) TLS extension |
1568
61a3285d77aa
Paraphrased the ALPN/NPN requirements note so it makes sense.
Ruslan Ermilov <ru@nginx.com>
parents:
1566
diff
changeset
|
65 support, which is available only since |
61a3285d77aa
Paraphrased the ALPN/NPN requirements note so it makes sense.
Ruslan Ermilov <ru@nginx.com>
parents:
1566
diff
changeset
|
66 <link url="http://www.openssl.org">OpenSSL</link> version 1.0.2. |
61a3285d77aa
Paraphrased the ALPN/NPN requirements note so it makes sense.
Ruslan Ermilov <ru@nginx.com>
parents:
1566
diff
changeset
|
67 Using the “Next Protocol Negotiation” (NPN) TLS extension for this purpose |
61a3285d77aa
Paraphrased the ALPN/NPN requirements note so it makes sense.
Ruslan Ermilov <ru@nginx.com>
parents:
1566
diff
changeset
|
68 (available since OpenSSL version 1.0.1) is not guaranteed. |
1566 | 69 </para> |
70 | |
1609
887ce78207ac
Added note about ssl_prefer_server_ciphers in HTTP/2.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1596
diff
changeset
|
71 <para> |
887ce78207ac
Added note about ssl_prefer_server_ciphers in HTTP/2.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1596
diff
changeset
|
72 Also note that if the |
887ce78207ac
Added note about ssl_prefer_server_ciphers in HTTP/2.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1596
diff
changeset
|
73 <link doc="ngx_http_ssl_module.xml" id="ssl_prefer_server_ciphers"/> directive |
1659
680cbf783efe
Fixed some misuses of "value".
Ruslan Ermilov <ru@nginx.com>
parents:
1636
diff
changeset
|
74 is set to the value “<literal>on</literal>”, |
1609
887ce78207ac
Added note about ssl_prefer_server_ciphers in HTTP/2.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1596
diff
changeset
|
75 the <link doc="ngx_http_ssl_module.xml" id="ssl_ciphers">ciphers</link> |
887ce78207ac
Added note about ssl_prefer_server_ciphers in HTTP/2.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1596
diff
changeset
|
76 should be configured to comply with |
887ce78207ac
Added note about ssl_prefer_server_ciphers in HTTP/2.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1596
diff
changeset
|
77 <link url="https://tools.ietf.org/html/rfc7540#appendix-A">RFC 7540, Appendix A</link> |
887ce78207ac
Added note about ssl_prefer_server_ciphers in HTTP/2.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1596
diff
changeset
|
78 black list and supported by clients. |
887ce78207ac
Added note about ssl_prefer_server_ciphers in HTTP/2.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1596
diff
changeset
|
79 </para> |
887ce78207ac
Added note about ssl_prefer_server_ciphers in HTTP/2.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1596
diff
changeset
|
80 |
1566 | 81 </section> |
82 | |
83 | |
84 <section id="directives" name="Directives"> | |
85 | |
86 <directive name="http2_chunk_size"> | |
87 <syntax><value>size</value></syntax> | |
88 <default>8k</default> | |
89 <context>http</context> | |
90 <context>server</context> | |
91 <context>location</context> | |
92 | |
93 <para> | |
94 Sets the maximum size of chunks | |
95 into which the response body is sliced. | |
96 A too low value results in higher overhead. | |
97 A too high value impairs prioritization due to | |
98 <link url="http://en.wikipedia.org/wiki/Head-of-line_blocking"> | |
99 HOL blocking</link>. | |
100 </para> | |
101 | |
102 </directive> | |
103 | |
104 | |
105 <directive name="http2_idle_timeout"> | |
106 <syntax><value>time</value></syntax> | |
107 <default>3m</default> | |
108 <context>http</context> | |
109 <context>server</context> | |
110 | |
111 <para> | |
112 Sets the timeout of inactivity after which the connection is closed. | |
113 </para> | |
114 | |
115 </directive> | |
116 | |
117 | |
118 <directive name="http2_max_concurrent_streams"> | |
119 <syntax><value>number</value></syntax> | |
120 <default>128</default> | |
121 <context>http</context> | |
122 <context>server</context> | |
123 | |
124 <para> | |
125 Sets the maximum number of concurrent HTTP/2 streams | |
126 in a connection. | |
127 </para> | |
128 | |
129 </directive> | |
130 | |
131 | |
1596
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
132 <directive name="http2_max_field_size"> |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
133 <syntax><value>size</value></syntax> |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
134 <default>4k</default> |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
135 <context>http</context> |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
136 <context>server</context> |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
137 |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
138 <para> |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
139 Limits the maximum size of |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
140 an <link url="http://tools.ietf.org/html/rfc7541">HPACK</link>-compressed |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
141 request header field. |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
142 The limit applies equally to both name and value. |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
143 Note that if Huffman encoding is applied, |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
144 the actual size of decompressed name and value strings may be larger. |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
145 For most requests, the default limit should be enough. |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
146 </para> |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
147 |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
148 </directive> |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
149 |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
150 |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
151 <directive name="http2_max_header_size"> |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
152 <syntax><value>size</value></syntax> |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
153 <default>16k</default> |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
154 <context>http</context> |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
155 <context>server</context> |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
156 |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
157 <para> |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
158 Limits the maximum size of the entire request header list after |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
159 <link url="http://tools.ietf.org/html/rfc7541">HPACK</link> decompression. |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
160 For most requests, the default limit should be enough. |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
161 </para> |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
162 |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
163 </directive> |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
164 |
e491c669220e
Documented http2_max_field_size, http2_max_header_size
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1580
diff
changeset
|
165 |
1566 | 166 <directive name="http2_recv_buffer_size"> |
167 <syntax><value>size</value></syntax> | |
168 <default>256k</default> | |
169 <context>http</context> | |
170 | |
171 <para> | |
1666
08f48ecb13ba
Added a hyperlink to http2_recv_buffer_size.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1659
diff
changeset
|
172 Sets the size of the per |
08f48ecb13ba
Added a hyperlink to http2_recv_buffer_size.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1659
diff
changeset
|
173 <link doc="../ngx_core_module.xml" id="worker_processes">worker</link> |
08f48ecb13ba
Added a hyperlink to http2_recv_buffer_size.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1659
diff
changeset
|
174 input buffer. |
1566 | 175 </para> |
176 | |
177 </directive> | |
178 | |
179 | |
180 <directive name="http2_recv_timeout"> | |
181 <syntax><value>time</value></syntax> | |
182 <default>30s</default> | |
183 <context>http</context> | |
184 <context>server</context> | |
185 | |
186 <para> | |
187 Sets the timeout for expecting more data from the client, | |
188 after which the connection is closed. | |
189 </para> | |
190 | |
191 </directive> | |
192 | |
193 </section> | |
194 | |
195 | |
196 <section id="variables" name="Embedded Variables"> | |
197 | |
198 <para> | |
199 The <literal>ngx_http_v2_module</literal> module | |
200 supports the following embedded variables: | |
201 <list type="tag" compact="no"> | |
202 | |
203 <tag-name id="var_http2"><var>$http2</var></tag-name> | |
204 <tag-desc> | |
205 negotiated protocol identifier: | |
206 “<literal>h2</literal>” for HTTP/2 over TLS, | |
207 “<literal>h2c</literal>” for HTTP/2 over cleartext TCP, | |
208 or an empty string otherwise. | |
209 </tag-desc> | |
210 | |
211 </list> | |
212 </para> | |
213 | |
214 </section> | |
215 | |
216 </module> |