comparison xml/en/docs/http/ngx_http_v2_module.xml @ 1566:0ca33afb461b

Added the http2 module.
author Yaroslav Zhuravlev <yar@nginx.com>
date Tue, 15 Sep 2015 21:00:27 +0300
parents
children 61a3285d77aa
comparison
equal deleted inserted replaced
1565:300349b7aef3 1566:0ca33afb461b
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"
12 rev="1">
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 <para>
30 <note>
31 This module is also available as part of our
32 <commercial_version>commercial subscription</commercial_version>
33 in the <literal>nginx-plus-http2</literal> package of NGINX Plus
34 <link url="https://www.nginx.com/blog/nginx-plus-r7-released/">release 7</link>.
35 </note>
36 </para>
37
38 </section>
39
40
41 <section id="example" name="Example Configuration">
42
43 <para>
44 <example>
45 server {
46 listen 443 ssl http2;
47
48 ssl_certificate server.crt;
49 ssl_certificate_key server.key;
50 }
51 </example>
52 <note>
53 Note that in order to accept both
54 <link doc="ngx_http_ssl_module.xml">HTTPS</link> and HTTP/2 connections
55 simultaneously on the same port, the
56 <link url="http://www.openssl.org">OpenSSL</link> library used should support
57 the “Application-Layer Protocol Negotiation” (ALPN) TLS extension
58 available only since OpenSSL version 1.0.2.
59 Accepting both types of connections with the
60 “Next Protocol Negotiation” (NPN) TLS extension available since OpenSSL
61 version 1.0.1 is possible but not guaranteed.
62 </note>
63 </para>
64
65 </section>
66
67
68 <section id="directives" name="Directives">
69
70 <directive name="http2_chunk_size">
71 <syntax><value>size</value></syntax>
72 <default>8k</default>
73 <context>http</context>
74 <context>server</context>
75 <context>location</context>
76
77 <para>
78 Sets the maximum size of chunks
79 into which the response body is sliced.
80 A too low value results in higher overhead.
81 A too high value impairs prioritization due to
82 <link url="http://en.wikipedia.org/wiki/Head-of-line_blocking">
83 HOL blocking</link>.
84 </para>
85
86 </directive>
87
88
89 <directive name="http2_idle_timeout">
90 <syntax><value>time</value></syntax>
91 <default>3m</default>
92 <context>http</context>
93 <context>server</context>
94
95 <para>
96 Sets the timeout of inactivity after which the connection is closed.
97 </para>
98
99 </directive>
100
101
102 <directive name="http2_max_concurrent_streams">
103 <syntax><value>number</value></syntax>
104 <default>128</default>
105 <context>http</context>
106 <context>server</context>
107
108 <para>
109 Sets the maximum number of concurrent HTTP/2 streams
110 in a connection.
111 </para>
112
113 </directive>
114
115
116 <directive name="http2_recv_buffer_size">
117 <syntax><value>size</value></syntax>
118 <default>256k</default>
119 <context>http</context>
120
121 <para>
122 Sets the size of the per worker input buffer.
123 </para>
124
125 </directive>
126
127
128 <directive name="http2_recv_timeout">
129 <syntax><value>time</value></syntax>
130 <default>30s</default>
131 <context>http</context>
132 <context>server</context>
133
134 <para>
135 Sets the timeout for expecting more data from the client,
136 after which the connection is closed.
137 </para>
138
139 </directive>
140
141 </section>
142
143
144 <section id="variables" name="Embedded Variables">
145
146 <para>
147 The <literal>ngx_http_v2_module</literal> module
148 supports the following embedded variables:
149 <list type="tag" compact="no">
150
151 <tag-name id="var_http2"><var>$http2</var></tag-name>
152 <tag-desc>
153 negotiated protocol identifier:
154 “<literal>h2</literal>” for HTTP/2 over TLS,
155 “<literal>h2c</literal>” for HTTP/2 over cleartext TCP,
156 or an empty string otherwise.
157 </tag-desc>
158
159 </list>
160 </para>
161
162 </section>
163
164 </module>