3) Enable HTTP2 Support
By default, the HTTP/2 protocol support is not added in Nginx and we need to add the below lines to particular virtualhost (Like 2daygeek.conf). For more configuration in Nginx wiht HTTP/2
[Just add http2 in listing line] listen 443 ssl http2; [Modify your certificate location] ssl on; ssl_certificate /etc/nginx/ssl/example.com.crt; ssl_certificate_key /etc/nginx/ssl/example.com.key;
Note
Make sure, you should install and configure SSL with nginx to work HTTP2.
4) Verify HTTP2 module
All the configuration got over, now times to check the status whether its working or not.
[ac-box color=”lred” icon=”fa-exclamation-circle”]
All the browsers are support HTTP2 with HTTPS Protocol. So, Make sure you should install HTTPS support on your server to enjoy/avail the HTTP2 features.
[/ac-box]
See the below screen shot, here i’m going to check via Firefox browser. how to check >> Tools >> Web Developer >> Network >> Choose the domain name “In my case its (localhost) with 200 GET status code”. Also you can verify by adding SPDY Indicator Add-on in Mozilla Firefox browser.
Alternatively we can check by Google chrome browser by navigating the link chrome://net-internals/#http2
See the detailed info from Google Chrome browser.
Hope, here after you also will migrate your server to HTTP2 for super fast & safer Internet.
Nice, article.
There’s one catch.
The Centos 7 nginx repo is built against OpenSSL 1.0.1. This version of OpenSSL only supports NPN and not ALPN. This means the faster secure handshakes you mentioned aren’t supported. The only work around is to recompile nginx from source and build it against OpenSSL 1.0.2 (which does support ALPN). Unfortunately, compiling and updating from source creates it’s own hassles.
Yes…you can go the centminmod route…but I haven’t tested this enough to know if it will break anything else.
I wish Nginx provided a repo that statically links in OpenSSL 1.0.2. This would really be ideal.
Also hoping Nginx adds http2 push.
@james,
Yes, its headache for compiling from source because whenever upgrade available we need to re-compile again and again also we need to check dependency for every time. Hope Nginx will push openSSL 1.0.2 for upcoming releases.
For source install you can visit @ http://nginx.org/patches/http2/README.txt