1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
4 <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7 This file is generated from xml source: DO NOT EDIT
8 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
10 <title>mod_http2 - Apache HTTP Server Version 2.5</title>
11 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
12 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
13 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
14 <script src="../style/scripts/prettify.min.js" type="text/javascript">
17 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
19 <div id="page-header">
20 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
21 <p class="apache">Apache HTTP Server Version 2.5</p>
22 <img alt="" src="../images/feather.png" /></div>
23 <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
25 <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.5</a> > <a href="./">Modules</a></div>
26 <div id="page-content">
27 <div id="preamble"><h1>Apache Module mod_http2</h1>
29 <p><span>Available Languages: </span><a href="../en/mod/mod_http2.html" title="English"> en </a></p>
31 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Support for the HTTP/2 transport layer</td></tr>
32 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
33 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>http2_module</td></tr>
34 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_http2.c</td></tr>
35 <tr><th><a href="module-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.4.17 and later</td></tr></table>
38 <p>This module provides HTTP/2 (<a href="https://tools.ietf.org/html/rfc7540">RFC 7540</a>)
39 support for the Apache HTTP Server.</p>
41 <p>This module relies on <a href="http://nghttp2.org/">libnghttp2</a>
42 to provide the core http/2 engine.</p>
44 <div class="warning"><h3>Warning</h3>
45 <p>This module is experimental. Its behaviors, directives, and
46 defaults are subject to more change from release to
47 release relative to other standard modules. Users are encouraged to
48 consult the "CHANGES" file for potential updates.</p>
51 <p>You must enable HTTP/2 via <code class="directive"><a href="../mod/core.html#protocols">Protocols</a></code>
52 in order to use the functionality described in this document. The
53 HTTP/2 protocol <a href="https://http2.github.io/faq/#does-http2-require-encryption">does not require</a> the use of encryption so two schemes are available:
54 <code>h2</code> (HTTP/2 over TLS) and <code>h2c</code> (HTTP/2 over TCP).</p>
56 <p>Two useful configuration schemes are:</p>
58 <div class="note"><h3>HTTP/2 in a VirtualHost context (TLS only)</h3>
59 <pre class="prettyprint lang-config">Protocols h2 http/1.1</pre>
61 <p>Allows HTTP/2 negotiation (h2) via TLS ALPN in a secure
62 <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>.
63 HTTP/2 preamble checking (Direct mode, see <code class="directive"><a href="#h2direct">H2Direct</a></code>) is disabled by default for <code>h2</code>.</p>
66 <div class="note"><h3>HTTP/2 in a Server context (TLS and cleartext)</h3>
67 <pre class="prettyprint lang-config">Protocols h2 h2c http/1.1</pre>
69 <p>Allows HTTP/2 negotiation (h2) via TLS ALPN for secure
70 <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>. Allows
71 HTTP/2 cleartext negotiation (h2c) upgrading from an initial HTTP/1.1
72 connection or via HTTP/2 preamble checking (Direct mode, see
73 <code class="directive"><a href="#h2direct">H2Direct</a></code>).</p>
76 <p>Refer to the official <a href="https://http2.github.io/faq">HTTP/2 FAQ</a>
77 for any doubt about the protocol.</p>
80 <div id="quickview"><h3>Topics</h3>
82 <li><img alt="" src="../images/down.gif" /> <a href="#how-it-works">How it works</a></li>
83 </ul><h3 class="directives">Directives</h3>
85 <li><img alt="" src="../images/down.gif" /> <a href="#h2copyfiles">H2CopyFiles</a></li>
86 <li><img alt="" src="../images/down.gif" /> <a href="#h2direct">H2Direct</a></li>
87 <li><img alt="" src="../images/down.gif" /> <a href="#h2earlyhints">H2EarlyHints</a></li>
88 <li><img alt="" src="../images/down.gif" /> <a href="#h2maxsessionstreams">H2MaxSessionStreams</a></li>
89 <li><img alt="" src="../images/down.gif" /> <a href="#h2maxworkeridleseconds">H2MaxWorkerIdleSeconds</a></li>
90 <li><img alt="" src="../images/down.gif" /> <a href="#h2maxworkers">H2MaxWorkers</a></li>
91 <li><img alt="" src="../images/down.gif" /> <a href="#h2minworkers">H2MinWorkers</a></li>
92 <li><img alt="" src="../images/down.gif" /> <a href="#h2moderntlsonly">H2ModernTLSOnly</a></li>
93 <li><img alt="" src="../images/down.gif" /> <a href="#h2push">H2Push</a></li>
94 <li><img alt="" src="../images/down.gif" /> <a href="#h2pushdiarysize">H2PushDiarySize</a></li>
95 <li><img alt="" src="../images/down.gif" /> <a href="#h2pushpriority">H2PushPriority</a></li>
96 <li><img alt="" src="../images/down.gif" /> <a href="#h2pushresource">H2PushResource</a></li>
97 <li><img alt="" src="../images/down.gif" /> <a href="#h2serializeheaders">H2SerializeHeaders</a></li>
98 <li><img alt="" src="../images/down.gif" /> <a href="#h2streammaxmemsize">H2StreamMaxMemSize</a></li>
99 <li><img alt="" src="../images/down.gif" /> <a href="#h2tlscooldownsecs">H2TLSCoolDownSecs</a></li>
100 <li><img alt="" src="../images/down.gif" /> <a href="#h2tlswarmupsize">H2TLSWarmUpSize</a></li>
101 <li><img alt="" src="../images/down.gif" /> <a href="#h2upgrade">H2Upgrade</a></li>
102 <li><img alt="" src="../images/down.gif" /> <a href="#h2windowsize">H2WindowSize</a></li>
104 <h3>Bugfix checklist</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">httpd changelog</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&list_id=144532&product=Apache%20httpd-2&query_format=specific&order=changeddate%20DESC%2Cpriority%2Cbug_severity&component=mod_http2">Known issues</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&component=mod_http2">Report a bug</a></li></ul><h3>See also</h3>
106 <li><a href="#comments_section">Comments</a></li></ul></div>
107 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
108 <div class="section">
109 <h2><a name="how-it-works" id="how-it-works">How it works</a></h2>
111 <h3><a name="dimensioning" id="dimensioning">HTTP/2 Dimensioning</a></h3>
113 Enabling HTTP/2 on your Apache Server has impact on the resource
114 consumption and if you have a busy site, you may need to consider
115 carefully the implications.
118 The first noticeable thing after enabling HTTP/2 is that your server
119 processes will start additional threads. The reason for this is that
120 HTTP/2 gives all requests that it receives to its own <em>Worker</em>
121 threads for processing, collects the results and streams them out
125 In the current implementation, these workers use a separate thread
126 pool from the MPM workers that you might be familiar with. This is
127 just how things are right now and not intended to be like this forever.
128 (It might be forever for the 2.4.x release line, though.) So, HTTP/2
129 workers, or shorter H2Workers, will not show up in <code class="module"><a href="../mod/mod_status.html">mod_status</a></code>. They
130 are also not counted against directives such as <code class="directive"><a href="../mod/mpm_common.html#threadsperchild">ThreadsPerChild</a></code>. However
131 they take <code class="directive"><a href="../mod/mpm_common.html#threadsperchild">ThreadsPerChild</a></code>
132 as default if you have not configured something
133 else via <code class="directive"><a href="#h2minworkers">H2MinWorkers</a></code> and
134 <code class="directive"><a href="#h2maxworkers">H2MaxWorkers</a></code>.
137 Another thing to watch out for is is memory consumption. Since HTTP/2
138 keeps more state on the server to manage all the open request, priorities
139 for and dependencies between them, it will always need more memory
140 than HTTP/1.1 processing. There are three directives which steer the
141 memory footprint of a HTTP/2 connection:
142 <code class="directive"><a href="#h2maxsessionstreams">H2MaxSessionStreams</a></code>,
143 <code class="directive"><a href="#h2windowsize">H2WindowSize</a></code> and
144 <code class="directive"><a href="#h2streammaxmemsize">H2StreamMaxMemSize</a></code>.
147 <code class="directive"><a href="#h2maxsessionstreams">H2MaxSessionStreams</a></code> limits the
148 number of parallel requests that a client can make on a HTTP/2 connection.
149 It depends on your site how many you should allow. The default is 100 which
150 is plenty and unless you run into memory problems, I would keep it this
151 way. Most requests that browsers send are GETs without a body, so they
152 use up only a little bit of memory until the actual processing starts.
155 <code class="directive"><a href="#h2windowsize">H2WindowSize</a></code> controls how much
156 the client is allowed to send as body of a request, before it waits
157 for the server to encourage more. Or, the other way around, it is the
158 amount of request body data the server needs to be able to buffer. This
162 And last, but not least, <code class="directive"><a href="#h2streammaxmemsize">H2StreamMaxMemSize</a></code>
163 controls how much response data shall be buffered. The request sits in
164 a H2Worker thread and is producing data, the HTTP/2 connection tries
165 to send this to the client. If the client does not read fast enough,
166 the connection will buffer this amount of data and then suspend the
171 <h3><a name="misdirected" id="misdirected">Multiple Hosts and Misdirected Requests</a></h3>
173 Many sites use the same TLS certificate for multiple virtual hosts. The
174 certificate either has a wildcard name, such as '*.example.org' or carries
175 several alternate names. Browsers using HTTP/2 will recognize that and reuse
176 an already opened connection for such hosts.
179 While this is great for performance, it comes at a price: such vhosts
180 need more care in their configuration. The problem is that you will have
181 multiple requests for multiple hosts on the same TLS connection. And that
182 makes renegotiation impossible, in face the HTTP/2 standard forbids it.
185 So, if you have several virtual hosts using the same certificate and
186 want to use HTTP/2 for them, you need to make sure that all vhosts have
187 exactly the same SSL configuration. You need the same protocol,
188 ciphers and settings for client verification.
191 If you mix things, Apache httpd will detect it and return a special
192 response code, 421 Misdirected Request, to the client.
196 <h3><a name="envvars" id="envvars">Environment Variables</a></h3>
198 This module can be configured to provide HTTP/2 related information
199 as additional environment variables to the SSI and CGI namespace, as well
200 as in custom log configurations (see <code>%{VAR_NAME}e</code>).
203 <table class="bordered">
206 <th><a name="table3">Variable Name:</a></th>
208 <th>Description:</th>
210 <tr><td><code>HTTP2</code></td><td>flag</td><td>HTTP/2 is being used.</td></tr>
211 <tr><td><code>H2PUSH</code></td><td>flag</td><td>HTTP/2 Server Push is enabled for this connection and also supported by the client.</td></tr>
212 <tr><td><code>H2_PUSH</code></td><td>flag</td><td>alternate name for <code>H2PUSH</code></td></tr>
213 <tr><td><code>H2_PUSHED</code></td><td>string</td><td>empty or <code>PUSHED</code> for a request being pushed by the server.</td></tr>
214 <tr><td><code>H2_PUSHED_ON</code></td><td>number</td><td>HTTP/2 stream number that triggered the push of this request.</td></tr>
215 <tr><td><code>H2_STREAM_ID</code></td><td>number</td><td>HTTP/2 stream number of this request.</td></tr>
216 <tr><td><code>H2_STREAM_TAG</code></td><td>string</td><td>HTTP/2 process unique stream identifier, consisting of connection id and stream id separated by <code>-</code>.</td></tr>
221 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
222 <div class="directive-section"><h2><a name="H2CopyFiles" id="H2CopyFiles">H2CopyFiles</a> <a name="h2copyfiles" id="h2copyfiles">Directive</a></h2>
223 <table class="directive">
224 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determine file handling in responses</td></tr>
225 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>H2CopyFiles on|off</code></td></tr>
226 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>H2CopyFiles off</code></td></tr>
227 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
228 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
229 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
230 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_http2</td></tr>
231 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.4.24 and later.</td></tr>
234 This directive influences how file content is handled in
235 responses. When <code>off</code>, which is the default, file handles
236 are passed from the requestion processing down to the main
237 connection, using the usual Apache setaside handling for
238 managing the lifetime of the file.
241 When set to <code>on</code>, file content is copied while the
242 request is still being processed and the buffered data is passed
243 on to the main connection. This is better if a third party
244 module is injecting files with different lifetimes into the response.
247 An example for such a module is <code>mod_wsgi</code> that may place
248 Python file handles into the response. Those files get close down when
249 Python thinks processing has finished. That may be well before
250 <code class="module"><a href="../mod/mod_http2.html">mod_http2</a></code> is done with them.
254 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
255 <div class="directive-section"><h2><a name="H2Direct" id="H2Direct">H2Direct</a> <a name="h2direct" id="h2direct">Directive</a></h2>
256 <table class="directive">
257 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>H2 Direct Protocol Switch</td></tr>
258 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>H2Direct on|off</code></td></tr>
259 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>H2Direct on for h2c, off for h2 protocol</code></td></tr>
260 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
261 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
262 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_http2</td></tr>
265 This directive toggles the usage of the HTTP/2 Direct Mode. This
266 should be used inside a
267 <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>
268 section to enable direct HTTP/2 communication for that virtual host.
271 Direct communication means that if the first bytes received by the
272 server on a connection match the HTTP/2 preamble, the HTTP/2
273 protocol is switched to immediately without further negotiation.
274 This mode is defined in RFC 7540 for the cleartext (h2c) case. Its
275 use on TLS connections not mandated by the standard.
278 When a server/vhost does not have h2 or h2c enabled via
279 <code class="directive"><a href="../mod/core.html#protocols">Protocols</a></code>,
280 the connection is never inspected for a HTTP/2 preamble.
281 <code class="directive">H2Direct</code>
282 does not matter then. This is important for connections that
283 use protocols where an initial read might hang indefinitely, such
287 For clients that have out-of-band knowledge about a server
288 supporting h2c, direct HTTP/2 saves the client from having to
289 perform an HTTP/1.1 upgrade, resulting in better performance
290 and avoiding the Upgrade restrictions on request bodies.
293 This makes direct h2c attractive for server to server communication
294 as well, when the connection can be trusted or is secured by other means.
296 <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">H2Direct on</pre>
300 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
301 <div class="directive-section"><h2><a name="H2EarlyHints" id="H2EarlyHints">H2EarlyHints</a> <a name="h2earlyhints" id="h2earlyhints">Directive</a></h2>
302 <table class="directive">
303 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determine sending of 103 status codes</td></tr>
304 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>H2EarlyHints on|off</code></td></tr>
305 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>H2EarlyHints off</code></td></tr>
306 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
307 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
308 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_http2</td></tr>
309 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.4.24 and later.</td></tr>
312 This setting controls if HTTP status 103 interim responses are
313 forwarded to the client or not. By default, this is currently
314 not the case since a range of clients still have trouble with
315 unexpected interim responses.
318 When set to <code>on</code>, PUSH resources announced with
319 <code>H2PushResource</code> will trigger an interim 103 response
320 before the final response. The 103 response will carry <code>Link</code>
321 headers that advise the <code>preload</code> of such resources.
325 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
326 <div class="directive-section"><h2><a name="H2MaxSessionStreams" id="H2MaxSessionStreams">H2MaxSessionStreams</a> <a name="h2maxsessionstreams" id="h2maxsessionstreams">Directive</a></h2>
327 <table class="directive">
328 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum number of active streams per HTTP/2 session.</td></tr>
329 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>H2MaxSessionStreams <em>n</em></code></td></tr>
330 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>H2MaxSessionStreams 100</code></td></tr>
331 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
332 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
333 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_http2</td></tr>
336 This directive sets the maximum number of active streams per HTTP/2 session (e.g. connection)
337 that the server allows. A stream is active if it is not <code>idle</code> or
338 <code>closed</code> according to RFC 7540.
340 <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">H2MaxSessionStreams 20</pre>
344 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
345 <div class="directive-section"><h2><a name="H2MaxWorkerIdleSeconds" id="H2MaxWorkerIdleSeconds">H2MaxWorkerIdleSeconds</a> <a name="h2maxworkeridleseconds" id="h2maxworkeridleseconds">Directive</a></h2>
346 <table class="directive">
347 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum number of seconds h2 workers remain idle until shut down.</td></tr>
348 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>H2MaxWorkerIdleSeconds <em>n</em></code></td></tr>
349 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>H2MaxWorkerIdleSeconds 600</code></td></tr>
350 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
351 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
352 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_http2</td></tr>
355 This directive sets the maximum number of seconds a h2 worker may
356 idle until it shuts itself down. This only happens while the number of
357 h2 workers exceeds <code class="directive"><a href="#h2minworkers">H2MinWorkers</a></code>.
359 <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">H2MaxWorkerIdleSeconds 20</pre>
363 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
364 <div class="directive-section"><h2><a name="H2MaxWorkers" id="H2MaxWorkers">H2MaxWorkers</a> <a name="h2maxworkers" id="h2maxworkers">Directive</a></h2>
365 <table class="directive">
366 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum number of worker threads to use per child process.</td></tr>
367 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>H2MaxWorkers <em>n</em></code></td></tr>
368 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
369 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
370 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_http2</td></tr>
373 This directive sets the maximum number of worker threads to spawn
374 per child process for HTTP/2 processing. If this directive is not used,
375 <code class="module"><a href="../mod/mod_http2.html">mod_http2</a></code> will chose a value suitable for the <code>mpm</code>
378 <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">H2MaxWorkers 20</pre>
382 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
383 <div class="directive-section"><h2><a name="H2MinWorkers" id="H2MinWorkers">H2MinWorkers</a> <a name="h2minworkers" id="h2minworkers">Directive</a></h2>
384 <table class="directive">
385 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Minimal number of worker threads to use per child process.</td></tr>
386 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>H2MinWorkers <em>n</em></code></td></tr>
387 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
388 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
389 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_http2</td></tr>
392 This directive sets the minimum number of worker threads to spawn
393 per child process for HTTP/2 processing. If this directive is not used,
394 <code class="module"><a href="../mod/mod_http2.html">mod_http2</a></code> will chose a value suitable for the <code>mpm</code>
397 <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">H2MinWorkers 10</pre>
401 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
402 <div class="directive-section"><h2><a name="H2ModernTLSOnly" id="H2ModernTLSOnly">H2ModernTLSOnly</a> <a name="h2moderntlsonly" id="h2moderntlsonly">Directive</a></h2>
403 <table class="directive">
404 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Require HTTP/2 connections to be "modern TLS" only</td></tr>
405 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>H2ModernTLSOnly on|off</code></td></tr>
406 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>H2ModernTLSOnly on</code></td></tr>
407 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
408 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
409 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_http2</td></tr>
410 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.4.18 and later.</td></tr>
413 This directive toggles the security checks on HTTP/2 connections
414 in TLS mode (https:). This can be used server wide or for specific
415 <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>s.
418 The security checks require that the TSL protocol is at least
419 TLSv1.2 and that none of the ciphers listed in RFC 7540, Appendix A
420 is used. These checks will be extended once new security requirements
424 The name stems from the
425 <a href="https://wiki.mozilla.org/Security/Server_Side_TLS">Security/Server Side TLS</a>
426 definitions at mozilla where "modern compatibility" is defined. Mozilla Firefox and
427 other browsers require modern compatibility for HTTP/2 connections. As everything
428 in OpSec, this is a moving target and can be expected to evolve in the future.
431 One purpose of having these checks in <code class="module"><a href="../mod/mod_http2.html">mod_http2</a></code> is to enforce this
432 security level for all connections, not only those from browsers. The other
433 purpose is to prevent the negotiation of HTTP/2 as a protocol should
434 the requirements not be met.
437 Ultimately, the security of the TLS connection is determined by the
438 server configuration directives for <code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code>.
440 <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">H2ModernTLSOnly off</pre>
444 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
445 <div class="directive-section"><h2><a name="H2Push" id="H2Push">H2Push</a> <a name="h2push" id="h2push">Directive</a></h2>
446 <table class="directive">
447 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>H2 Server Push Switch</td></tr>
448 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>H2Push on|off</code></td></tr>
449 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>H2Push on</code></td></tr>
450 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
451 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
452 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_http2</td></tr>
453 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.4.18 and later.</td></tr>
456 This directive toggles the usage of the HTTP/2 server push
460 The HTTP/2 protocol allows the server to push other resources to
461 a client when it asked for a particular one. This is helpful
462 if those resources are connected in some way and the client can
463 be expected to ask for it anyway. The pushing then saves the
464 time it takes the client to ask for the resources itself. On the
465 other hand, pushing resources the client never needs or already
466 has is a waste of bandwidth.
469 Server pushes are detected by inspecting the <code>Link</code> headers of
470 responses (see https://tools.ietf.org/html/rfc5988 for the
471 specification). When a link thus specified has the <code>rel=preload</code>
472 attribute, it is treated as a resource to be pushed.
475 Link headers in responses are either set by the application or
476 can be configured via <code class="module"><a href="../mod/mod_headers.html">mod_headers</a></code> as:
478 <div class="example"><h3>mod_headers example</h3><pre class="prettyprint lang-config"><Location /index.html>
479 Header add Link "</css/site.css>;rel=preload"
480 Header add Link "</images/logo.jpg>;rel=preload"
481 </Location></pre>
484 As the example shows, there can be several link headers added
485 to a response, resulting in several pushes being triggered. There
486 are no checks in the module to avoid pushing the same resource
487 twice or more to one client. Use with care.
490 HTTP/2 server pushes are enabled by default. This directive
491 allows it to be switch off on all resources of this server/virtual
494 <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">H2Push off</pre>
497 Last but not least, pushes happen only when the client signals
498 its willingness to accept those. Most browsers do, some, like Safari 9,
499 do not. Also, pushes also only happen for resources from the same
500 <em>authority</em> as the original response is for.
504 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
505 <div class="directive-section"><h2><a name="H2PushDiarySize" id="H2PushDiarySize">H2PushDiarySize</a> <a name="h2pushdiarysize" id="h2pushdiarysize">Directive</a></h2>
506 <table class="directive">
507 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>H2 Server Push Diary Size</td></tr>
508 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>H2PushDiarySize <em>n</em></code></td></tr>
509 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>H2PushDiarySize 256</code></td></tr>
510 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
511 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
512 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_http2</td></tr>
513 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.4.19 and later.</td></tr>
516 This directive toggles the maximum number of HTTP/2 server pushes
517 that are remembered per HTTP/2 connection. This can be used inside the
518 <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>
519 section to influence the number for all connections to that virtual host.
522 The push diary records a digest (currently using a 64 bit number) of pushed
523 resources (their URL) to avoid duplicate pushes on the same connection.
524 These value are not persisted, so clients opening a new connection
525 will experience known pushes again. There is ongoing work to enable
526 a client to disclose a digest of the resources it already has, so
527 the diary maybe initialized by the client on each connection setup.
530 If the maximum size is reached, newer entries replace the oldest
531 ones. A diary entry uses 8 bytes, letting a
532 default diary with 256 entries consume around 2 KB of memory.
535 A size of 0 will effectively disable the push diary.
539 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
540 <div class="directive-section"><h2><a name="H2PushPriority" id="H2PushPriority">H2PushPriority</a> <a name="h2pushpriority" id="h2pushpriority">Directive</a></h2>
541 <table class="directive">
542 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>H2 Server Push Priority</td></tr>
543 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>H2PushPriority <em>mime-type</em> [after|before|interleaved] [weight]</code></td></tr>
544 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>H2PushPriority * After 16</code></td></tr>
545 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
546 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
547 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_http2</td></tr>
548 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.4.18 and later. For having an
549 effect, a nghttp2 library version 1.5.0 or newer is necessary.</td></tr>
552 This directive defines the priority handling of pushed responses
553 based on the content-type of the response. This is usually defined
554 per server config, but may also appear in a virtual host.
557 HTTP/2 server pushes are always related to a client request. Each
558 such request/response pairs, or <em>streams</em> have a dependency
559 and a weight, together defining the <em>priority</em> of a stream.
562 When a stream <em>depends</em> on another, say X depends on Y,
563 then Y gets all bandwidth before X gets any. Note that this
564 does not mean that Y will block X. If Y has no data to send,
565 all bandwidth allocated to Y can be used by X.
568 When a stream has more than one dependant, say X1 and X2 both
569 depend on Y, the <em>weight</em> determines the bandwidth
570 allocation. If X1 and X2 have the same weight, they both get
571 half of the available bandwidth. If the weight of X1 is twice
572 as large as that for X2, X1 gets twice the bandwidth of X2.
575 Ultimately, every stream depends on the <em>root</em> stream which
576 gets all the bandwidth available, but never sends anything. So all
577 its bandwidth is distributed by weight among its children. Which
578 either have data to send or distribute the bandwidth to their
579 own children. And so on. If none of the children have data
580 to send, that bandwidth get distributed somewhere else according
584 The purpose of this priority system is to always make use of
585 available bandwidth while allowing precedence and weight
586 to be given to specific streams. Since, normally, all streams
587 are initiated by the client, it is also the one that sets
591 Only when such a stream results in a PUSH, gets the server to
592 decide what the <em>initial</em> priority of such a pushed
593 stream is. In the examples below, X is the client stream. It
594 depends on Y and the server decides to PUSH streams P1 and P2
598 The default priority rule is:
600 <div class="example"><h3>Default Priority Rule</h3><pre class="prettyprint lang-config">H2PushPriority * After 16</pre>
603 which reads as 'Send a pushed stream of any content-type
604 depending on the client stream with weight 16'. And so P1
605 and P2 will be send after X and, as they have equal weight,
606 share bandwidth equally among themselves.
608 <div class="example"><h3>Interleaved Priority Rule</h3><pre class="prettyprint lang-config">H2PushPriority text/css Interleaved 256</pre>
611 which reads as 'Send any CSS resource on the same dependency and
612 weight as the client stream'. If P1 has content-type 'text/css',
613 it will depend on Y (as does X) and its effective weight will be
614 calculated as <code>P1ew = Xw * (P1w / 256)</code>. With P1w being
615 256, this will make the effective weight the same as the weight
616 of X. If both X and P1 have data to send, bandwidth will be allocated
620 With Pw specified as 512, a pushed, interleaved stream would
621 get double the weight of X. With 128 only half as much. Note that
622 effective weights are always capped at 256.
624 <div class="example"><h3>Before Priority Rule</h3><pre class="prettyprint lang-config">H2PushPriority application/json Before</pre>
627 This says that any pushed stream of content type 'application/json'
628 should be send out <em>before</em> X. This makes P1 dependent
629 on Y and X dependent on P1. So, X will be stalled as long as
630 P1 has data to send. The effective weight is inherited from the
631 client stream. Specifying a weight is not allowed.
634 Be aware that the effect of priority specifications is limited
635 by the available server resources. If a server does not have
636 workers available for pushed streams, the data for the stream
637 may only ever arrive when other streams have been finished.
640 Last, but not least, there are some specifics of the syntax
641 to be used in this directive:
644 <li>'*' is the only special content-type that matches all others.
645 'image/*' will not work.</li>
646 <li>The default dependency is 'After'. </li>
647 <li>There are also default weights: for 'After' it is 16, 'interleaved' is 256.
650 <div class="example"><h3>Shorter Priority Rules</h3><pre class="prettyprint lang-config">H2PushPriority application/json 32 # an After rule
651 H2PushPriority image/jpeg before # weight inherited
652 H2PushPriority text/css interleaved # weight 256 default</pre>
656 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
657 <div class="directive-section"><h2><a name="H2PushResource" id="H2PushResource">H2PushResource</a> <a name="h2pushresource" id="h2pushresource">Directive</a></h2>
658 <table class="directive">
659 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Declares resources for early pushing to the client</td></tr>
660 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>H2PushResource [add] path [critical]</code></td></tr>
661 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
662 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
663 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
664 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_http2</td></tr>
665 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.4.24 and later.</td></tr>
668 When added to a directory/location HTTP/2 PUSHes will be attempted
669 for all paths added via this directive. This directive can be used
670 several times for the same location.
673 This directive pushes resources much earlier than adding
674 <code>Link</code> headers via <code class="module"><a href="../mod/mod_headers.html">mod_headers</a></code>.
675 <code class="module"><a href="../mod/mod_http2.html">mod_http2</a></code> announces these resources in a
676 <code>103 Early Hints</code> interim response to the client.
677 That means that clients not supporting PUSH will still get
681 In contrast to setting <code>Link</code> response headers
682 via <code class="module"><a href="../mod/mod_headers.html">mod_headers</a></code>, this directive will only
683 take effect on HTTP/2 connections.
686 By adding <code>critical</code> to such a resource, the server
687 will give processing it more preference and send its data, once
688 available, before the data from the main request.
692 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
693 <div class="directive-section"><h2><a name="H2SerializeHeaders" id="H2SerializeHeaders">H2SerializeHeaders</a> <a name="h2serializeheaders" id="h2serializeheaders">Directive</a></h2>
694 <table class="directive">
695 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Serialize Request/Response Processing Switch</td></tr>
696 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>H2SerializeHeaders on|off</code></td></tr>
697 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>H2SerializeHeaders off</code></td></tr>
698 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
699 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
700 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_http2</td></tr>
703 This directive toggles if HTTP/2 requests shall be serialized in
704 HTTP/1.1 format for processing by <code>httpd</code> core or if
705 received binary data shall be passed into the <code>request_rec</code>s
709 Serialization will lower performance, but gives more backward
710 compatibility in case custom filters/hooks need it.
712 <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">H2SerializeHeaders on</pre>
716 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
717 <div class="directive-section"><h2><a name="H2StreamMaxMemSize" id="H2StreamMaxMemSize">H2StreamMaxMemSize</a> <a name="h2streammaxmemsize" id="h2streammaxmemsize">Directive</a></h2>
718 <table class="directive">
719 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum amount of output data buffered per stream.</td></tr>
720 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>H2StreamMaxMemSize <em>bytes</em></code></td></tr>
721 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>H2StreamMaxMemSize 65536</code></td></tr>
722 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
723 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
724 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_http2</td></tr>
727 This directive sets the maximum number of outgoing data bytes buffered in memory
728 for an active streams. This memory is not allocated per stream as such. Allocations
729 are counted against this limit when they are about to be done. Stream processing
730 freezes when the limit has been reached and will only continue when buffered data
731 has been sent out to the client.
733 <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">H2StreamMaxMemSize 128000</pre>
737 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
738 <div class="directive-section"><h2><a name="H2TLSCoolDownSecs" id="H2TLSCoolDownSecs">H2TLSCoolDownSecs</a> <a name="h2tlscooldownsecs" id="h2tlscooldownsecs">Directive</a></h2>
739 <table class="directive">
740 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td /></tr>
741 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>H2TLSCoolDownSecs <em>seconds</em></code></td></tr>
742 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>H2TLSCoolDownSecs 1</code></td></tr>
743 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
744 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
745 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_http2</td></tr>
746 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.4.18 and later.</td></tr>
749 This directive sets the number of seconds of idle time on a TLS
750 connection before the TLS write size falls back to small (~1300 bytes)
752 This can be used server wide or for specific
753 <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>s.
756 See <code class="directive"><a href="#h2tlswarmupsize">H2TLSWarmUpSize</a></code> for a
757 description of TLS warmup. <code class="directive">H2TLSCoolDownSecs</code> reflects the fact
758 that connections may deteriorate over time (and TCP flow adjusts)
759 for idle connections as well. It is beneficial to overall performance
760 to fall back to the pre-warmup phase after a number of seconds that
761 no data has been sent.
764 In deployments where connections can be considered reliable, this
765 timer can be disabled by setting it to 0.
768 The following example sets the seconds to zero, effectively disabling
769 any cool down. Warmed up TLS connections stay on maximum record
772 <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">H2TLSCoolDownSecs 0</pre>
776 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
777 <div class="directive-section"><h2><a name="H2TLSWarmUpSize" id="H2TLSWarmUpSize">H2TLSWarmUpSize</a> <a name="h2tlswarmupsize" id="h2tlswarmupsize">Directive</a></h2>
778 <table class="directive">
779 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td /></tr>
780 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>H2TLSWarmUpSize <em>amount</em></code></td></tr>
781 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>H2TLSWarmUpSize 1048576</code></td></tr>
782 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
783 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
784 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_http2</td></tr>
785 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.4.18 and later.</td></tr>
788 This directive sets the number of bytes to be sent in small
789 TLS records (~1300 bytes) until doing maximum sized writes (16k)
790 on https: HTTP/2 connections.
791 This can be used server wide or for specific
792 <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>s.
795 Measurements by <a href="https://www.igvita.com">google performance
796 labs</a> show that best performance on TLS connections is reached,
797 if initial record sizes stay below the MTU level, to allow a
798 complete record to fit into an IP packet.
801 While TCP adjust its flow-control and window sizes, longer TLS
802 records can get stuck in queues or get lost and need retransmission.
803 This is of course true for all packets. TLS however needs the
804 whole record in order to decrypt it. Any missing bytes at the end
805 will stall usage of the received ones.
808 After a sufficient number of bytes have been send successfully,
809 the TCP state of the connection is stable and maximum TLS record
810 sizes (16 KB) can be used for optimal performance.
813 In deployments where servers are reached locally or over reliable
814 connections only, the value might be decreased with 0 disabling
815 any warmup phase altogether.
818 The following example sets the size to zero, effectively disabling
821 <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">H2TLSWarmUpSize 0</pre>
825 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
826 <div class="directive-section"><h2><a name="H2Upgrade" id="H2Upgrade">H2Upgrade</a> <a name="h2upgrade" id="h2upgrade">Directive</a></h2>
827 <table class="directive">
828 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>H2 Upgrade Protocol Switch</td></tr>
829 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>H2Upgrade on|off</code></td></tr>
830 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>H2Upgrade on for h2c, off for h2 protocol</code></td></tr>
831 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
832 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
833 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_http2</td></tr>
836 This directive toggles the usage of the HTTP/1.1 Upgrade method
837 for switching to HTTP/2. This
838 should be used inside a
839 <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>
840 section to enable Upgrades to HTTP/2 for that virtual host.
843 This method of switching protocols is defined in HTTP/1.1 and
844 uses the "Upgrade" header (thus the name) to announce willingness
845 to use another protocol. This may happen on any request of a
849 This method of protocol switching is enabled by default on cleartext
850 (potential h2c) connections and disabled on TLS (potential h2),
851 as mandated by RFC 7540.
854 Please be aware that Upgrades are only accepted for requests
855 that carry no body. POSTs and PUTs with content will never
856 trigger an upgrade to HTTP/2.
857 See <code class="directive"><a href="#h2direct">H2Direct</a></code> for an
858 alternative to Upgrade.
861 This mode only has an effect when h2 or h2c is enabled via
862 the <code class="directive"><a href="../mod/core.html#protocols">Protocols</a></code>.
864 <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">H2Upgrade on</pre>
868 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
869 <div class="directive-section"><h2><a name="H2WindowSize" id="H2WindowSize">H2WindowSize</a> <a name="h2windowsize" id="h2windowsize">Directive</a></h2>
870 <table class="directive">
871 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Size of Stream Window for upstream data.</td></tr>
872 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>H2WindowSize <em>bytes</em></code></td></tr>
873 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>H2WindowSize 65535</code></td></tr>
874 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
875 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
876 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_http2</td></tr>
879 This directive sets the size of the window that is used for flow control
880 from client to server and limits the amount of data the server has to buffer.
881 The client will stop sending on a stream once the limit has been reached until
882 the server announces more available space (as it has processed some of the data).
884 This limit affects only request bodies, not its meta data such as headers. Also,
885 it has no effect on response bodies as the window size for those are managed
888 <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">H2WindowSize 128000</pre>
893 <div class="bottomlang">
894 <p><span>Available Languages: </span><a href="../en/mod/mod_http2.html" title="English"> en </a></p>
895 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
896 <script type="text/javascript"><!--//--><![CDATA[//><!--
897 var comments_shortname = 'httpd';
898 var comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/mod_http2.html';
900 if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
901 d.write('<div id="comments_thread"><\/div>');
902 var s = d.createElement('script');
903 s.type = 'text/javascript';
905 s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
906 (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
909 d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
911 })(window, document);
912 //--><!]]></script></div><div id="footer">
913 <p class="apache">Copyright 2017 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
914 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
915 if (typeof(prettyPrint) !== 'undefined') {