Setting up and testing HTTP/2
As detailed in Chapter 4, Module Configuration, the HTTP/2 protocol is now supported by Nginx and supersedes the SPDY protocol that was designed by Google, in order to improve page-loading times for visitors through various techniques (data compression, multiplexing of requests, and more). HTTP/2 can be enabled quite simply by making sure the module exists in your Nginx build, and appending a flag to your listen configuration directive.
If you are unsure whether you included the HTTP/2 module in your Nginx build, run the nginx -V command to find out. If you did not include it, you should rebuild Nginx with the --with-http_v2_module command line argument. Once HTTP/2 is available, open up your server block configuration ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access