Would you like to learn how to enable the HTTP2 protocol on Nginx? In this tutorial, we are going to show you how to configure the HTTP2 protocol on the Nginx server of a computer running Ubuntu Linux.

• Ubuntu 18
• Ubuntu 19
• Ubuntu 20
• Nginx 1.18.0

In our example, the Nginx server is hosting the website WWW.GAMEKING.TIPS.

Equipment list

The following section presents the list of equipment used to create this tutorial.

As an Amazon Associate, I earn from qualifying purchases.

Tutorial Nginx - Enable HTTP2

Install the Nginx server.

Copy to Clipboard

Edit the Nginx configuration file for the website.

Copy to Clipboard

On the HTTPS area, add the HTTP2 word to the LISTEN configuration item.

Copy to Clipboard

Make sure that you have an HTTPS website configured on the Nginx server.

HTTPS is a requirement for HTTP2.

As an example, here is our configuration file.

Copy to Clipboard

Restart the Nginx service.

Copy to Clipboard

In our example, we enabled the HTTP2 protocol on the Nginx server.

From a remote Linux computer, try to access an HTTPS page.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

The first line displayed confirms the use of the HTTP2 protocol.

Congratulations! You enabled the HTTP2 protocol on the Nginx server.