<p>It is safe to specify protocols that are unavailable/disabled. Such
protocol names will simply be ignored.</p>
- <p>Protocols specified in base servers and virtual hosts are concatenated
- by appending the base ones, if there are configured protocols,
- to the virtual host ones. Since protocols such as HTTP/2 allow
- connection reuse under certain conditions, restricting protocols for
- individual virtual hosts might not work as you expect it to.</p>
+ <p>Protocols specified in base servers are inherited for virtual hosts
+ only if the virtual host has no own Protocols directive. Or, the other
+ way around, Protocols directives in virtual hosts replace any
+ such directive in the base server.
+ </p>
</usage>
<seealso><directive module="core">ProtocolsHonorOrder</directive></seealso>
CONFIGURATION
-The most important configuration options is
-
- H2Engine On|Off
-
-which can be set on the base server or a virtual host. By default, the
-engine is 'Off'. Please see the documentation of mod_h2 for a complete
-list and explanation of other options.
+If mod_h2 is enabled for a site or not depends on the new "Protocols"
+directive. This directive list all protocols enabled for a server or
+virtual host.
+
+If you do not specify "Protocols" all available protocols are enabled. For
+sites using TLS, the protocol supported by mod_h2 is "h2". For cleartext
+http:, the offered protocol is "h2c".
+
+The following is an example of a server that only supports http/1.1 in
+general and offers h2 for a specific virtual host.
+
+ ...
+ Protocols http/1.1
+ <virtualhost *:443>
+ Protocols h2 http/1.1
+ ...
+ </virtualhost>
+
+Please see the documentation of mod_h2 for a complete list and explanation
+of all options.
TLS CONFIGURATION
? virt->merge_trailers
: base->merge_trailers;
- conf->protocols = apr_array_append(p, virt->protocols, base->protocols);
+ conf->protocols = ((virt->protocols->nelts > 0)?
+ virt->protocols : base->protocols);
conf->protocols_honor_order = ((virt->protocols_honor_order < 0)?
base->protocols_honor_order :
virt->protocols_honor_order);