From b3a9f5adae4dbf185145acdeb320435125c84746 Mon Sep 17 00:00:00 2001 From: Christophe Jaillet Date: Sun, 24 Jun 2018 19:15:34 +0000 Subject: [PATCH] More s/code/module/ Prefer to hard coded Add some direct links to directives Split long lines git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1834259 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/howto/http2.xml | 38 +++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/docs/manual/howto/http2.xml b/docs/manual/howto/http2.xml index bba5a4b9cc..d568887344 100644 --- a/docs/manual/howto/http2.xml +++ b/docs/manual/howto/http2.xml @@ -31,7 +31,7 @@ change between releases.

-
mod_http2 + mod_http2
The HTTP/2 protocol @@ -62,7 +62,7 @@
HTTP/2 in Apache httpd

The HTTP/2 protocol is implemented by its own httpd module, aptly named - mod_http2. It implements the complete set + mod_http2. It implements the complete set of features described by RFC 7540 and supports HTTP/2 over cleartext (http:), as well as secure (https:) connections. The cleartext variant is named 'h2c', the secure one 'h2'. For h2c it allows the direct @@ -74,8 +74,8 @@

Build httpd with HTTP/2 support -

mod_http2 uses the library of nghttp2 - as its implementation base. In order to build mod_http2 you need at least version 1.2.1 of +

mod_http2 uses the library of nghttp2 + as its implementation base. In order to build mod_http2 you need at least version 1.2.1 of libnghttp2 installed on your system.

When you ./configure you Apache httpd source tree, you need to give it '--enable-http2' as additional argument to trigger the build of the module. @@ -84,7 +84,7 @@ to configure.

While that should do the trick for most, they are people who might prefer a statically linked nghttp2 in this module. For those, the option --enable-nghttp2-staticlib-deps - exists. It works quite similar to how one statically links openssl to mod_ssl.

+ exists. It works quite similar to how one statically links openssl to mod_ssl.

Speaking of SSL, you need to be aware that most browsers will speak HTTP/2 only on https: URLs, so you need a server with SSL support. But not only that, you will need a SSL library that supports the ALPN extension. If OpenSSL is the library you use, you need @@ -94,7 +94,7 @@

Basic Configuration -

When you have a httpd built with mod_http2 you need some +

When you have a httpd built with mod_http2 you need some basic configuration for it becoming active. The first thing, as with every Apache module, is that you need to load it:

@@ -123,7 +123,13 @@ Protocols http/1.1

This allows only HTTP/1 on connections, except SSL connections to test.example.org which offer HTTP/2.

Choose a strong SSLCipherSuite -

The SSLCipherSuite needs to be configured with a strong TLS cipher suite. The current version of mod_http2 does not enforce any cipher but most clients do so. Pointing a browser to a h2 enabled server with a inappropriate cipher suite will force it to simply refuse and fall back to HTTP 1.1. This is a common mistake that is done while configuring httpd for HTTP/2 the first time, so please keep it in mind to avoid long debugging sessions! If you want to be sure about the cipher suite to choose please avoid the ones listed in the HTTP/2 TLS blacklist.

+

The SSLCipherSuite needs to be configured with + a strong TLS cipher suite. The current version of mod_http2 does not enforce any cipher but most + clients do so. Pointing a browser to a h2 enabled server with a inappropriate + cipher suite will force it to simply refuse and fall back to HTTP 1.1. This is a common mistake + that is done while configuring httpd for HTTP/2 the first time, so please keep it in mind to avoid + long debugging sessions! If you want to be sure about the cipher suite to choose please avoid + the ones listed in the HTTP/2 TLS blacklist.

The order of protocols mentioned is also relevant. By default, the first one is the most preferred protocol. When a client offers multiple choices, the one most to the @@ -148,7 +154,8 @@ ProtocolsHonorOrder Off ordering will decide.

A last thing: the protocols you configure are not checked for correctness or spelling. You can mention protocols that do not exist, so there is no need - to guard Protocols with any IfModule checks.

+ to guard Protocols with any + IfModule checks.

For more advanced tips on configuration, see the modules section about dimensioning and how to manage multiple hosts with the same certificate.

@@ -206,7 +213,10 @@ ProtocolsHonorOrder Off
  • h2load - useful to stress-test your server.
  • Chrome offers detailed HTTP/2 logs on its connections via the - special net-internals page. There is also an interesting extension for Chrome and Firefox to visualize when your browser is using HTTP/2.

    + special net-internals page. There is also an + interesting extension for Chrome + and Firefox + to visualize when your browser is using HTTP/2.

    @@ -227,7 +237,7 @@ ProtocolsHonorOrder Off

    To summarize: there is no one good strategy on how to make best use of this feature of HTTP/2 and everyone is still experimenting. So, how do you experiment with it in Apache httpd?

    -

    mod_http2 inspect response header for Link headers +

    mod_http2 inspect response header for Link headers in a certain format:

    Link </xxx.css>;rel=preload, </xxx.js>; rel=preload @@ -257,7 +267,7 @@ H2Push Off

    There are people thinking about how a client can tell a server what it already has, so PUSHes for those things can be avoided, but this is all highly experimental right now.

    -

    Another experimental draft that has been implemented in mod_http2 +

    Another experimental draft that has been implemented in mod_http2 is the Accept-Push-Policy Header Field where a client can, for each request, define what kind of PUSHes it accepts.

    @@ -290,7 +300,7 @@ H2Push Off H2EarlyHints on

    (It is not enabled by default since some older browser tripped on such responses.)

    -

    If this feature is on, you can the directive H2PushResource to +

    If this feature is on, you can the directive H2PushResource to trigger early hints and resource PUSHes:

    <Location /xxx.html> @@ -302,8 +312,8 @@ H2EarlyHints on as the server starts processing the request. This may be much early than the time the first response headers have been determined, depending on your web application.

    -

    If H2Push is enabled, this will also start the PUSH right after the - 103 response. If H2Push is disabled however, the 103 response will be send +

    If H2Push is enabled, this will also start the PUSH right after the + 103 response. If H2Push is disabled however, the 103 response will be send nevertheless to the client.

    -- 2.40.0