Apache: Configure for HTTP/2
Configure Apache to use HTTP/2 protocol.
The HTTP/2 protocol has enhancements that improve the speed in which pages load in web browsers.
The HTTP/2 protocol is available over unencrypted (http://) and encrypted (https://) channels, but
most major browsers only support use of HTTP/2 over HTTPS. Therefore, you need to ensure:
- HTTPS is enabled on your server.
- Your Apache is version 2.4.17 or greater.
Let the client define the protocol
For Apache, the following directives configure
HTTP/2:
ProtocolsHonorOrder On
Protocols h2 http/1.1
With these directives, ProtocolsHonorOrder On
means that Apache chooses the
protocol and HTTP/2 is the first choice.
However, the recommendation is that the client define the preferred protocol. This will allow the GAS to work with services that may not need the HTTP/2 protocol. This will also avoid an error where a client that does not support HTTP/2 receives the following response from the server:
Upgrade: h2 Connection: Upgrade
Follow this procedure to configure Apache with the directive ProtocolsHonorOrder
Off
, allowing the client to select the protocol.