Apache2 Http2

Posted on  by admin

Apache 2.4.17 ships with mod_http2. Available in Debian 9 (stretch) and Ubuntu 16.04 (Xenial Xerus) (see comments) Ubuntu 16.10 (Yakkety Yak), it brings HTTP/2 support to one of the Internet’s popular Web servers. Assuming you’ve already configured a SSL/TLS Website, this quick tutorial will show you how to quickly enable HTTP/2.

Apache2Apache2

Based on mod_h2, the module is still very experimental. It should be enabled manually, on a site-by-site basis, via the Protocols directive. The module’s defaults otherwise don’t need to be changed.

First, enable the module:

In the <VirtualHost> stanzas for your Website served over TLS in your Apache configuration, add the Protocols directive:

If you need to debug a HTTP/2 connection with Apache, you can always raise the logging level for the modhttp2 module. Http2module LogLevel http2:debug With debug connections and HTTP/2 frames received/sent are logged. This gives you clues, if HTTP/2 is used and if the server receives what you client thinks got sent. Apache 2.4.17 ships with modhttp2. Available in Debian 9 (stretch) and Ubuntu 16.04 (Xenial Xerus) (see comments) Ubuntu 16.10 (Yakkety Yak), it brings HTTP/2 support to one of the Internet's popular. The Apache HTTP Server codebase was relicensed to the Apache 2.0 License (from the previous 1.1 license) in January 2004, and Apache HTTP Server 1.3.31. When you check your version of apache2 by typing: apache2 -v you’ll notice that Apache 2.4.18 is the current default version for Ubuntu 16.04. However, you need Apache 2.4.24 or later for compatibility with HTTP/2.

Restart Apache:

If you’ve curl 7.34.0 or later, you can test whether HTTP/2 is working by running:

and look for mentions of “http2”.

Enable Http2 Apache2

While you’re fiddling with your Web server configuration, consider updating your SSL settings with Mozilla’s great SSL configuration generator.