Nginx: HTTP/2 available via alpha patch

HTTP/2 is supported by more and more browsers, only the web servers are still partially stuck. For Nginx, a first patch has been released which includes the new protocol.

nginx_logoTo do this, it is of course first necessary that Nginx self compiled will. I'm using the current mainline branch (currently 1.9.4) as a base, but I still need OpenSSL 1.0.2 installed. At Nginx blog an article with the matching patch has been published.

The patch itself is quite easy to apply. First you have to download the patch file:

wget http://nginx.org/patches/http2/patch.http2.txt

Once this is done, a test run should be carried out first. Otherwise, even in a test environment, you may waste unnecessary time (run the following in the Nginx directory, adjust the path to the patch file if necessary):

patch -p1 --dry-run < patch.http2.txt


If this works - without error messages or other conspicuous features - you can go ahead and apply the patch:

patch -p1 < patch.http2.txt

After that, nginx will compile normally, only that with ./configure-Options additional -with-http_v2_modules is specified - otherwise the configuration is identical to Configuration with SPDY.

After the installation you get a Nginx server with HTTP/2 Support. Although the patch is an alpha version that should not be used in production, Nginx 1.9.4 runs quite stable with HTTP/2 - if you can read this post, this is the proof.

HTTP/2 as the official successor of HTTP 1.1, which was passed in May, is based to a large extent on work by Google (SPDY) and Microsoft (HTTP Speed+Mobility) and is intended to significantly accelerate the loading of web pages. Increased security is also an aspect: without SSL there is currently no support for HTTP/2.

Leave a Comment

Your email address will not be published. Required fields are marked *

en_USEnglish
Scroll to Top