AtulHost
  • Business
    • Career and Education
    • Finance and Investments
    • Marketing Strategies
  • Productivity
  • Technology
    • Consumer Electronics
    • Solar Energy
  • Tutorials

How to Enable HTTP/2 on NGINX?

By AtulHost in Tutorials ⋅ September 1st, 2016
Facebook Tweet LinkedIn

HTTP/2

The experimental support for HTTP/2 became available in Nginx since the mainline version 1.9.5 and with the help of SSL it is really easy to enable it, I’ll show you how enable HTTP/2 on Nginx.

Related: Install and Secure Nginx with Let’s Encrypt on Ubuntu

If you’re already running SPDY on your web server already, please note that the SPDY module have been replaced with the HTTP/2 module in Nginx. Fortunately, to run HTTP/2 you just need to upgrade to Nginx 1.9.5 or later and replace spdy with http2 on your listen directive line.

First check whether Nginx is compiled with HTTP/2 or not.

nginx -V

Make sure you can find --with-http_v2_module somewhere in that output. If you are not seeing this then you need to upgrade Nginx to latest version.

Now we just need to just a single word to your Nginx config.

Open the server block config for your HTTPS site (all implementations of HTTP/2 require HTTPS), and change this line:

listen 443 ssl;

to

listen 443 ssl http2;

now real your configuration so Nginx apply these settings.

service nginx reload

Now you have successfuly enabled HTTP/2 on Nginx, all you need to do is now test your app’s or website’s speed and performance.

Content is tagged with HTTP2, nginx.
Facebook Tweet LinkedIn

You’ll also like:

  • Nginx Config (Explained by Example)
  • How to Start, Stop, or Restart Nginx?
  • What is Nginx? How Does it Work? Explained
  • How to fix “Specify a Vary: Accept-Encoding Header” warning?
  • Install Latest Stable Version of NGINX in Ubuntu
  • How to cache static content on Nginx?
  • How to Configure FastCGI Cache with Nginx?
  • 413 request entity too large
  • How to fix “No Input File Specified” error?
  • How to install phpMyAdmin on Debian 10?

Published by AtulHost

Atul is a creative blogger who loves to do experiments with the latest business initiatives and tech trends like automation, artificial intelligence, cloud and edge computing, data science, hardware as well as networking, and the internet of things.

Make a comment Cancel reply

Required fields are asterisked and your email address will not be shared.

Subscribe

Recent Posts

  • HR trends for 2021
  • How to pick the right financing company for your customers
  • How to reduce initial server response time?
  • What every ecommerce business needs to know when it comes to product images
  • What is shared hosting?
  • How your online business can be everything a customer needs it to be?
Taking care of communication within your small business
Cool business ideas

We serve cookies on this site to offer the excellent user service.

  • About
  • Contact
  • Privacy Policy
  • Terms and Conditions
  • Write for Us
This website and its content are copyrighted © 2014-2021 by atulhost.com and individual contributors.