Commit 75c78221 authored by Christophe Jaillet's avatar Christophe Jaillet
Browse files

Split long lines

Align examples on the left to be consistent
Add some missing <em> in syntax description
Add some hyperlinks to modules and directives
Fix some bogus <directive type="section"> usage
Fix typo
(r1738690 and r1738693 in trunk)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1738698 13f79535-47bb-0310-9956-ffa450edef68
parent e44991d3
Loading
Loading
Loading
Loading
+65 −51
Original line number Diff line number Diff line
@@ -43,8 +43,11 @@
                consult the "CHANGES" file for potential updates.</p>
        </note>
        
        <p>You must enable HTTP/2 via <directive module="core">Protocols</directive> in order to use the
        functionality described in this document. The 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: <code>h2</code> (HTTP/2 over TLS) and <code>h2c</code> (HTTP/2 over TCP).</p>
        <p>You must enable HTTP/2 via <directive module="core">Protocols</directive>
        in order to use the functionality described in this document. The
        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:
        <code>h2</code> (HTTP/2 over TLS) and <code>h2c</code> (HTTP/2 over TCP).</p>

        <p>Two useful configuration schemes are:</p>
        
@@ -52,17 +55,25 @@
        <highlight language="config">
Protocols h2 http/1.1
        </highlight>
        <p>Allows HTTP/2 negotiation (h2) via TLS ALPN in a secure <directive>VirtualHost</directive>. HTTP/2 preamble checking (Direct mode, see <directive>H2Direct</directive>) is disabled by default for <code>h2</code>.</p>
        <p>Allows HTTP/2 negotiation (h2) via TLS ALPN in a secure
        <directive module="core" type="section">VirtualHost</directive>.
        HTTP/2 preamble checking (Direct mode, see <directive module="mod_http2"
        >H2Direct</directive>) is disabled by default for <code>h2</code>.</p>
        </note>

        <note><title>HTTP/2 in a Server context (TLS and cleartext)</title>
        <highlight language="config">
Protocols h2 h2c http/1.1
        </highlight>
        <p>Allows HTTP/2 negotiation (h2) via TLS ALPN for secure <directive>VirtualHost</directive>. Allows HTTP/2 cleartext negotiation (h2c) upgrading from an initial HTTP/1.1 connection or via HTTP/2 preamble checking (Direct mode, see <directive>H2Direct</directive>).</p>
        <p>Allows HTTP/2 negotiation (h2) via TLS ALPN for secure
        <directive module="core" type="section">VirtualHost</directive>. Allows
        HTTP/2 cleartext negotiation (h2c) upgrading from an initial HTTP/1.1
        connection or via HTTP/2 preamble checking (Direct mode, see
        <directive module="mod_http2">H2Direct</directive>).</p>
        </note>

        <p>Refer to the official <a href="https://http2.github.io/faq">HTTP/2 FAQ</a> for any doubt about the protocol.</p>
        <p>Refer to the official <a href="https://http2.github.io/faq">HTTP/2 FAQ</a>
        for any doubt about the protocol.</p>
        
    </summary>
    
@@ -86,11 +97,13 @@ 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
            are also not counted against directives such as ThreadsPerChild. However
            they take ThreadsPerChild as default if you have not configured something
            else via <directive>H2MinWorkers</directive> and
            <directive>H2MaxWorkers</directive>.
            workers, or shorter H2Workers, will not show up in <module>mod_status</module>. They
            are also not counted against directives such as <directive module="mpm_common"
            >ThreadsPerChild</directive>. However
            they take <directive module="mpm_common">ThreadsPerChild</directive>
            as default if you have not configured something
            else via <directive module="mod_http2">H2MinWorkers</directive> and
            <directive module="mod_http2">H2MaxWorkers</directive>.
        </p>
        <p>
            Another thing to watch out for is is memory consumption. Since HTTP/2
@@ -98,12 +111,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:
            <directive>H2MaxSessionStreams</directive>,
            <directive>H2WindowSize</directive> and
            <directive>H2StreamMaxMemSize</directive>.
            <directive module="mod_http2">H2MaxSessionStreams</directive>,
            <directive module="mod_http2">H2WindowSize</directive> and
            <directive module="mod_http2">H2StreamMaxMemSize</directive>.
        </p>
        <p>
            <directive>H2MaxSessionStreams</directive> limits the
            <directive module="mod_http2">H2MaxSessionStreams</directive> 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 +124,14 @@ Protocols h2 h2c http/1.1
            use up only a little bit of memory until the actual processing starts.
        </p>
        <p>
            <directive>H2WindowSize</directive> controls how much
            <directive module="mod_http2">H2WindowSize</directive> 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.
        </p>
        <p>
            And last, but not least, <directive>H2StreamMaxMemSize</directive>
            And last, but not least, <directive module="mod_http2">H2StreamMaxMemSize</directive>
            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 +139,7 @@ Protocols h2 h2c http/1.1
            H2Worker.
        </p>
        <p>
            If you serve a lot of static files, <directive>H2SessionExtraFiles</directive>
            If you serve a lot of static files, <directive module="mod_http2">H2SessionExtraFiles</directive>
            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 +229,9 @@ Protocols h2 h2c http/1.1
            </p>
            <p>
                When a server/vhost does not have h2 or h2c enabled via
                <directive module="core" type="section">Protocols</directive>,
                the connection is never inspected for a HTTP/2 preamble. H2Direct
                <directive module="core">Protocols</directive>,
                the connection is never inspected for a HTTP/2 preamble.
                <directive>H2Direct</directive>
                does not matter then. This is important for connections that
                use protocols where an initial read might hang indefinitely, such
                as NNTP.
@@ -313,7 +327,7 @@ Protocols h2 h2c http/1.1
    <directivesynopsis>
        <name>H2PushDiarySize</name>
        <description>H2 Server Push Diary Size</description>
        <syntax>H2PushDiarySize n</syntax>
        <syntax>H2PushDiarySize <em>n</em></syntax>
        <default>H2PushDiarySize 256</default>
        <contextlist>
            <context>server config</context>
@@ -350,7 +364,7 @@ Protocols h2 h2c http/1.1
    <directivesynopsis>
        <name>H2PushPriority</name>
        <description>H2 Server Push Priority</description>
        <syntax>H2PushPriority mime-type [after|before|interleaved] [weight]</syntax>
        <syntax>H2PushPriority <em>mime-type</em> [after|before|interleaved] [weight]</syntax>
        <default>H2PushPriority * After 16</default>
        <contextlist>
            <context>server config</context>
@@ -373,7 +387,7 @@ Protocols h2 h2c http/1.1
            <p>
                When a stream <em>depends</em> 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.
            </p>
            <p>
@@ -511,12 +525,12 @@ 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 <directive type="section">H2Direct</directive> for an 
                See <directive module="mod_http2">H2Direct</directive> for an 
                alternative to Upgrade.
            </p>
            <p>
                This mode only has an effect when h2 or h2c is enabled via
                the <directive module="core" type="section">Protocols</directive>.
                the <directive module="core">Protocols</directive>.
            </p>
            <example><title>Example</title>
                <highlight language="config">
@@ -613,7 +627,7 @@ H2PushPriority text/css interleaved # weight 256 default
            <p>
                This directive sets the minimum number of worker threads to spawn
                per child process for HTTP/2 processing. If this directive is not used,
                <code>mod_http2</code> will chose a value suitable for the <code>mpm</code>
                <module>mod_http2</module> will chose a value suitable for the <code>mpm</code>
                module loaded.
            </p>
            <example><title>Example</title>
@@ -635,7 +649,7 @@ H2PushPriority text/css interleaved # weight 256 default
            <p>
                This directive sets the maximum number of worker threads to spawn
                per child process for HTTP/2 processing. If this directive is not used,
                <code>mod_http2</code> will chose a value suitable for the <code>mpm</code>
                <module>mod_http2</module> will chose a value suitable for the <code>mpm</code>
                module loaded.
            </p>
            <example><title>Example</title>
@@ -658,7 +672,7 @@ H2PushPriority text/css interleaved # weight 256 default
            <p>
                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 <code>H2MinWorkers</code>.
                h2 workers exceeds <directive module="mod_http2">H2MinWorkers</directive>.
            </p>
            <example><title>Example</title>
                <highlight language="config">
@@ -768,14 +782,14 @@ H2PushPriority text/css interleaved # weight 256 default
                in OpSec, this is a moving target and can be expected to evolve in the future.
            </p>
            <p>
                One purpose of having these checks in mod_http2 is to enforce this
                One purpose of having these checks in <module>mod_http2</module> 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.
            </p>
            <p>
                Ultimately, the security of the TLS connection is determined by the
                server configuration directives for mod_ssl.
                server configuration directives for <module>mod_ssl</module>.
            </p>
            <example><title>Example</title>
                <highlight language="config">
@@ -788,7 +802,7 @@ H2PushPriority text/css interleaved # weight 256 default
    <directivesynopsis>
        <name>H2TLSWarmUpSize</name>
        <description></description>
        <syntax>H2TLSWarmUpSize amount</syntax>
        <syntax>H2TLSWarmUpSize <em>amount</em></syntax>
        <default>H2TLSWarmUpSize 1048576</default>
        <contextlist>
            <context>server config</context>
@@ -842,7 +856,7 @@ H2PushPriority text/css interleaved # weight 256 default
    <directivesynopsis>
        <name>H2TLSCoolDownSecs</name>
        <description></description>
        <syntax>H2TLSCoolDownSecs seconds</syntax>
        <syntax>H2TLSCoolDownSecs <em>seconds</em></syntax>
        <default>H2TLSCoolDownSecs 1</default>
        <contextlist>
            <context>server config</context>
@@ -859,8 +873,8 @@ H2PushPriority text/css interleaved # weight 256 default
                <directive module="core" type="section">VirtualHost</directive>s. 
            </p>
            <p>
                See <directive type="section">H2TLSWarmUpSize</directive> for a
                description of TLS warmup. H2TLSCoolDownSecs reflects the fact
                See <directive module="mod_http2">H2TLSWarmUpSize</directive> for a
                description of TLS warmup. <directive>H2TLSCoolDownSecs</directive> 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