From: Christophe Jaillet Date: Tue, 12 Apr 2016 06:09:19 +0000 (+0000) Subject: Split long lines X-Git-Tag: 2.5.0-alpha~1755 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=150f951be04a6d0a461ad3e6593dc74cf46d9801;p=apache Split long lines Align examples on the left to be consistent Add some missing in syntax description Add some hyperlinks to modules and directives Fix some bogus usage Fix typo git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1738690 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_http2.xml b/docs/manual/mod/mod_http2.xml index d83f2f6e66..197f71a1a6 100644 --- a/docs/manual/mod/mod_http2.xml +++ b/docs/manual/mod/mod_http2.xml @@ -34,7 +34,7 @@ support for the Apache HTTP Server.

This module relies on libnghttp2 - to provide the core http/2 engine.

+ to provide the core http/2 engine.

Warning

This module is experimental. Its behaviors, directives, and @@ -43,8 +43,11 @@ consult the "CHANGES" file for potential updates.

-

You must enable HTTP/2 via Protocols in order to use the - functionality described in this document. The HTTP/2 protocol does not require the use of encryption so two schemes are available: h2 (HTTP/2 over TLS) and h2c (HTTP/2 over TCP).

+

You must enable HTTP/2 via Protocols + in order to use the functionality described in this document. The + HTTP/2 protocol does not require the use of encryption so two schemes are available: + h2 (HTTP/2 over TLS) and h2c (HTTP/2 over TCP).

Two useful configuration schemes are:

@@ -52,17 +55,25 @@ Protocols h2 http/1.1 -

Allows HTTP/2 negotiation (h2) via TLS ALPN in a secure VirtualHost. HTTP/2 preamble checking (Direct mode, see H2Direct) is disabled by default for h2.

+

Allows HTTP/2 negotiation (h2) via TLS ALPN in a secure + VirtualHost. + HTTP/2 preamble checking (Direct mode, see H2Direct) is disabled by default for h2.

HTTP/2 in a Server context (TLS and cleartext) Protocols h2 h2c http/1.1 -

Allows HTTP/2 negotiation (h2) via TLS ALPN for secure VirtualHost. Allows HTTP/2 cleartext negotiation (h2c) upgrading from an initial HTTP/1.1 connection or via HTTP/2 preamble checking (Direct mode, see H2Direct).

+

Allows HTTP/2 negotiation (h2) via TLS ALPN for secure + VirtualHost. Allows + HTTP/2 cleartext negotiation (h2c) upgrading from an initial HTTP/1.1 + connection or via HTTP/2 preamble checking (Direct mode, see + H2Direct).

-

Refer to the official HTTP/2 FAQ for any doubt about the protocol.

+

Refer to the official HTTP/2 FAQ + for any doubt about the protocol.

@@ -86,11 +97,12 @@ Protocols h2 h2c http/1.1 pool from the MPM workers that you might be familiar with. This is just how things are right now and not intended to be like this forever. (It might be forever for the 2.4.x release line, though.) So, HTTP/2 - workers, or shorter H2Workers, will not show up in mod_status. They + workers, or shorter H2Workers, will not show up in mod_status. They are also not counted against directives such as ThreadsPerChild. However - they take ThreadsPerChild as default if you have not configured something - else via H2MinWorkers and - H2MaxWorkers. + they take ThreadsPerChild + as default if you have not configured something + else via H2MinWorkers and + H2MaxWorkers.

Another thing to watch out for is is memory consumption. Since HTTP/2 @@ -98,12 +110,12 @@ Protocols h2 h2c http/1.1 for and dependencies between them, it will always need more memory than HTTP/1.1 processing. There are three directives which steer the memory footprint of a HTTP/2 connection: - H2MaxSessionStreams, - H2WindowSize and - H2StreamMaxMemSize. + H2MaxSessionStreams, + H2WindowSize and + H2StreamMaxMemSize.

- H2MaxSessionStreams limits the + H2MaxSessionStreams limits the number of parallel requests that a client can make on a HTTP/2 connection. It depends on your site how many you should allow. The default is 100 which is plenty and unless you run into memory problems, I would keep it this @@ -111,14 +123,14 @@ Protocols h2 h2c http/1.1 use up only a little bit of memory until the actual processing starts.

- H2WindowSize controls how much + H2WindowSize controls how much the client is allowed to send as body of a request, before it waits for the server to encourage more. Or, the other way around, it is the amount of request body data the server needs to be able to buffer. This is per request.

- And last, but not least, H2StreamMaxMemSize + And last, but not least, H2StreamMaxMemSize controls how much response data shall be buffered. The request sits in a H2Worker thread and is producing data, the HTTP/2 connection tries to send this to the client. If the client does not read fast enough, @@ -126,7 +138,7 @@ Protocols h2 h2c http/1.1 H2Worker.

- If you serve a lot of static files, H2SessionExtraFiles + If you serve a lot of static files, H2SessionExtraFiles is of interest. This tells the server how many file handles per HTTP/2 connection it is allowed to waste for better performance. Because when a request produces a static file as the response, the file handle @@ -216,8 +228,9 @@ Protocols h2 h2c http/1.1

When a server/vhost does not have h2 or h2c enabled via - Protocols, - the connection is never inspected for a HTTP/2 preamble. H2Direct + Protocols, + the connection is never inspected for a HTTP/2 preamble. + H2Direct does not matter then. This is important for connections that use protocols where an initial read might hang indefinitely, such as NNTP. @@ -234,7 +247,7 @@ Protocols h2 h2c http/1.1

Example - H2Direct on +H2Direct on @@ -298,7 +311,7 @@ Protocols h2 h2c http/1.1

Example - H2Push off +H2Push off

@@ -313,7 +326,7 @@ Protocols h2 h2c http/1.1 H2PushDiarySize H2 Server Push Diary Size - H2PushDiarySize n + H2PushDiarySize n H2PushDiarySize 256 server config @@ -373,7 +386,7 @@ Protocols h2 h2c http/1.1

When a stream depends on another, say X depends on Y, then Y gets all bandwidth before X gets any. Note that this - does not men that Y will block X. If Y has no data to send, + does not mean that Y will block X. If Y has no data to send, all bandwidth allocated to Y can be used by X.

@@ -411,7 +424,7 @@ Protocols h2 h2c http/1.1

Default Priority Rule - H2PushPriority * After 16 +H2PushPriority * After 16

@@ -422,7 +435,7 @@ Protocols h2 h2c http/1.1

Interleaved Priority Rule - H2PushPriority text/css Interleaved 256 +H2PushPriority text/css Interleaved 256

@@ -441,7 +454,7 @@ Protocols h2 h2c http/1.1

Before Priority Rule - H2PushPriority application/json Before +H2PushPriority application/json Before

@@ -511,16 +524,16 @@ H2PushPriority text/css interleaved # weight 256 default Please be aware that Upgrades are only accepted for requests that carry no body. POSTs and PUTs with content will never trigger an upgrade to HTTP/2. - See H2Direct for an + See H2Direct for an alternative to Upgrade.

This mode only has an effect when h2 or h2c is enabled via - the Protocols. + the Protocols.

Example - H2Upgrade on +H2Upgrade on @@ -543,7 +556,7 @@ H2PushPriority text/css interleaved # weight 256 default

Example - H2MaxSessionStreams 20 +H2MaxSessionStreams 20 @@ -568,7 +581,7 @@ H2PushPriority text/css interleaved # weight 256 default

Example - H2StreamMaxMemSize 128000 +H2StreamMaxMemSize 128000 @@ -596,7 +609,7 @@ H2PushPriority text/css interleaved # weight 256 default

Example - H2WindowSize 128000 +H2WindowSize 128000 @@ -613,12 +626,12 @@ H2PushPriority text/css interleaved # weight 256 default

This directive sets the minimum number of worker threads to spawn per child process for HTTP/2 processing. If this directive is not used, - mod_http2 will chose a value suitable for the mpm + mod_http2 will chose a value suitable for the mpm module loaded.

Example - H2MinWorkers 10 +H2MinWorkers 10 @@ -635,12 +648,12 @@ H2PushPriority text/css interleaved # weight 256 default

This directive sets the maximum number of worker threads to spawn per child process for HTTP/2 processing. If this directive is not used, - mod_http2 will chose a value suitable for the mpm + mod_http2 will chose a value suitable for the mpm module loaded.

Example - H2MaxWorkers 20 +H2MaxWorkers 20 @@ -658,11 +671,11 @@ H2PushPriority text/css interleaved # weight 256 default

This directive sets the maximum number of seconds a h2 worker may idle until it shuts itself down. This only happens while the number of - h2 workers exceeds H2MinWorkers. + h2 workers exceeds H2MinWorkers.

Example - H2MaxWorkerIdleSeconds 20 +H2MaxWorkerIdleSeconds 20 @@ -698,7 +711,7 @@ H2PushPriority text/css interleaved # weight 256 default Example - H2SessionExtraFiles 10 +H2SessionExtraFiles 10

@@ -731,7 +744,7 @@ H2PushPriority text/css interleaved # weight 256 default

Example - H2SerializeHeaders on +H2SerializeHeaders on @@ -768,18 +781,18 @@ H2PushPriority text/css interleaved # weight 256 default in OpSec, this is a moving target and can be expected to evolve in the future.

- One purpose of having these checks in mod_http2 is to enforce this + One purpose of having these checks in mod_http2 is to enforce this security level for all connections, not only those from browsers. The other purpose is to prevent the negotiation of HTTP/2 as a protocol should the requirements not be met.

Ultimately, the security of the TLS connection is determined by the - server configuration directives for mod_ssl. + server configuration directives for mod_ssl.

Example - H2ModernTLSOnly off +H2ModernTLSOnly off @@ -788,7 +801,7 @@ H2PushPriority text/css interleaved # weight 256 default H2TLSWarmUpSize - H2TLSWarmUpSize amount + H2TLSWarmUpSize amount H2TLSWarmUpSize 1048576 server config @@ -833,7 +846,7 @@ H2PushPriority text/css interleaved # weight 256 default

Example - H2TLSWarmUpSize 0 +H2TLSWarmUpSize 0 @@ -859,8 +872,8 @@ H2PushPriority text/css interleaved # weight 256 default VirtualHosts.

- See H2TLSWarmUpSize for a - description of TLS warmup. H2TLSCoolDownSecs reflects the fact + See H2TLSWarmUpSize for a + description of TLS warmup. H2TLSCoolDownSecs reflects the fact that connections may deteriorate over time (and TCP flow adjusts) for idle connections as well. It is beneficial to overall performance to fall back to the pre-warmup phase after a number of seconds that @@ -877,7 +890,7 @@ H2PushPriority text/css interleaved # weight 256 default

Example - H2TLSCoolDownSecs 0 +H2TLSCoolDownSecs 0