{"id":252,"date":"2022-07-18T16:01:00","date_gmt":"2022-07-18T16:01:00","guid":{"rendered":"https:\/\/www.webhi.com\/how-to\/?p=252"},"modified":"2022-07-21T11:30:35","modified_gmt":"2022-07-21T11:30:35","slug":"how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/","title":{"rendered":"How To Setup Nginx with HTTP\/2 Support on Ubuntu 18.04"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/nginx_http2_ubuntu_en.jpg\" alt=\"Setup Nginx with HTTP\/2 Support on Ubuntu\" class=\"wp-image-785\" srcset=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/nginx_http2_ubuntu_en.jpg 1200w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/nginx_http2_ubuntu_en-300x169.jpg 300w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/nginx_http2_ubuntu_en-1024x576.jpg 1024w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/nginx_http2_ubuntu_en-768x432.jpg 768w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/nginx_http2_ubuntu_en-150x84.jpg 150w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<p>Nginx is known for its speed and reliability as an open-source web server. It is popular for its low memory requirements, high scalability, easy configuration, and support for many protocols.<\/p>\n\n\n\n<p>The Hypertext Transport Protocol is where HTTP\/2 recently originated from. The latter is used on the Web to deliver pages from server to browser. HTTP\/2 is HTTP\u2019s first major update in almost twenty years. HTTP 1.1 was introduced to the public at the end of the 20th century, when webpages were just one long HTML file with an inline CSS stylesheet. Following that, the internet underwent significant transformation, and we are now confronted with the restrictions of HTTP 1.1. Because of how it downloads portions of a page in a queue (the download of the next section may only begin after the previous one has been completed), it reduces the achievable transfer rates for most current websites; on average, each modern web page requires roughly 100 requests to download (each request is a picture, JS file, CSS file, etc).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why HTTP\/2 :<\/h3>\n\n\n\n<p>HTTP\/2 brings a solution to this problem through some basic changes:<\/p>\n\n\n\n<ul><li>The download of requests is done in parallel rather than in a queue.<\/li><li>HTTP headers are compressed.<\/li><li>The transfer of pages is not done as a text file, but rather as a binary for better results.<\/li><li>Servers can \u201cpush\u201d data even without the user\u2019s request, which improves speed for users with high latency.<\/li><li>Data can be \u201cpushed\u201d by servers regardless of the user\u2019s demand, and this is helpful to high-latency users, which provides them with more speed.<\/li><\/ul>\n\n\n\n<p>Regardless of the fact that HTTP\/2 requires no encryption, the developers of Google Chrome and Mozilla Firefox, the internet\u2019s most used browsers, stated that they will support HTTP\/2 only for HTTPS connections for security reasons. This being said, you will also need to secure them with HTTPS if you decide to use HTTP\/2 support to set up servers.<\/p>\n\n\n\n<p>We provide you with this guide that will help you use HTTP\/2 support to create a fast and secure Nginx server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><strong>Prerequisites<\/strong><\/strong><\/h2>\n\n\n\n<p>First thing, before starting, these things are essential:<\/p>\n\n\n\n<ul><li>Set up one Ubuntu 18.04 server.<\/li><li>Install Nginx on your server.<\/li><li>Configure a domain name to point to your server. <a href=\"https:\/\/www.webhi.com\/register-domain-name\" target=\"_blank\" rel=\"noreferrer noopener\">You can register cheap domain names here<\/a>.<\/li><li>Configure a TLS\/SSL certificate for your server. There are three possibilities:<ul><li>Getting a free certificate from Let\u2019s Encrypt<\/li><li>Generating and configuring a self-signed certificate\u00a0<\/li><li>Buying it from another provider and configuring Nginx to use it<\/li><\/ul><\/li><\/ul>\n\n\n\n<ul><li>Configure Nginx to redirect traffic from port 80 to port 443, which is covered by the prerequisites beforehand.<\/li><li>Configure Nginx to use a 2048-bit or a stronger Ephemeral Diffie-Hellman (DHE) key, which should also be in the previous prerequisites.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong><strong>Step 1 \u2014 Activating HTTP\/2 Support<\/strong><\/strong><\/h3>\n\n\n\n<p>First, your domain should already have a server block at <strong>&nbsp;\/etc\/nginx\/sites-available\/your_domain<\/strong> with the <strong>server_name<\/strong> directive appropriately set. The first change to be made will be allowing your domain\u2019s server block to use HTTP\/2 by modifying it.<\/p>\n\n\n\n<p>Launch your domain\u2019s configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo nano \/etc\/nginx\/sites-available\/your_domain<\/code><\/pre>\n\n\n\n<p>Locate the <strong>listen<\/strong> variables related to port <strong>443<\/strong> in the file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">...\n\n    listen [::]:443 ssl ipv6only=on;\n\n    listen 443 ssl; \n\n...<\/pre>\n\n\n\n<p>The first variable belongs to IPv6 connections, and the second one is for all IPv4 connections. HTTP\/2 is to be enabled for both.<\/p>\n\n\n\n<p>Each <strong><kbd>listen<\/kbd><\/strong> directive should be modified to include <strong><kbd>http2<\/kbd><\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">...\n\n    listen [::]:443 ssl http2 ipv6only=on;\n\n    listen 443 ssl http2; \n\n...<\/pre>\n\n\n\n<p>This asks for the use of HTTP\/2 from Nginx with supported browsers.<\/p>\n\n\n\n<p>Edit the text editor after saving the configuration file.<\/p>\n\n\n\n<p>Every time changes are made to Nginx configuration files, make sure you also pay attention to syntax errors in the configuration, through:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo nginx -t<\/code><\/pre>\n\n\n\n<p>The following output will appear if the syntax is error-free:<\/p>\n\n\n\n<h5 class=\"has-text-align-center wp-block-heading\"><kbd>Output:<\/kbd><\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\">nginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful<\/pre>\n\n\n\n<p>After that, our server has to be configured to allow the use of a more defined ciphers\u2019 list.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong><strong>Step 2 \u2014 Removing Old and Insecure Cipher Suites<\/strong><\/strong><\/h3>\n\n\n\n<p>There is a blacklist of old and insecure ciphers in HTTP\/2 that must be avoided. Cipher suites are cryptographic algorithms describing the way that transferred data must be encrypted.<\/p>\n\n\n\n<p>The method you\u2019re supposed to use to define the ciphers is dependent on your chosen configuration of your Nginx TLS\/SSL certificates.<\/p>\n\n\n\n<p>If you obtained your certificates through Certbot, then the file <kbd>\/etc\/letsencrypt\/options-ssl-nginx.conf<\/kbd> was created and contains ciphers that aren\u2019t powerful enough for HTTP\/2. Unfortunately, it would prevent Certbot from applying updates in the future if this file is modified. In this case, we\u2019ll tell Nginx not to use this file while specifying our own list of ciphers.<\/p>\n\n\n\n<p>Launch your domain\u2019s server block configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">sudo nano \/etc\/nginx\/sites-available\/your_domain<\/code><\/pre>\n\n\n\n<p>Identify the line that has the <strong><kbd>options-ssl-nginx.conf<\/kbd><\/strong> file and comment it out:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># include \/etc\/letsencrypt\/options-ssl-nginx.conf; # managed by Certbot<\/pre>\n\n\n\n<p>Add the following line underneath that one in order to define the ciphers allowed:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;<\/pre>\n\n\n\n<p>Exit the editor after saving the file.<\/p>\n\n\n\n<p>In your text editor, go ahead and open the file <strong><kbd>\/etc\/nginx\/snippets\/ssl-params.conf<\/kbd><\/strong> if you used self-signed certificates or a third party\u2019s certificate and had it configured based on the prerequisites:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo nano \/etc\/nginx\/snippets\/ssl-params.conf<\/code><\/pre>\n\n\n\n<p>Find this line:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">...\nssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384;<\/pre>\n\n\n\n<p>Edit it to look like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">...\nssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;<\/pre>\n\n\n\n<p>Exit the editor after saving the file.<\/p>\n\n\n\n<p>Make sure, this time too, that you check for syntax errors in the configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo nginx -t<\/code><\/pre>\n\n\n\n<p>If you identify an error, address it, then test again.<\/p>\n\n\n\n<p>Restart Nginx once there are no more syntax errors<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo systemctl restart nginx<\/code><\/pre>\n\n\n\n<p>Restart Nginx once there are no more syntax errors<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong><strong>Step 3 \u2014 Verifying that HTTP\/2 is Activated<\/strong><\/strong><\/h3>\n\n\n\n<p>We should verify that the server is running and can work with HTTP\/2.<\/p>\n\n\n\n<p>Make a request to your site by using the <strong>curl <\/strong>command and view the headers:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ curl -I -L https:\/\/your_domain<\/code><\/pre>\n\n\n\n<p>The following output will appear:<\/p>\n\n\n\n<h5 class=\"has-text-align-center wp-block-heading\"><kbd>Output:<\/kbd><\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\">HTTP\/1.1 301 Moved Permanently\nServer: nginx\/1.14.0 (Ubuntu)\nDate: Fri, 06 Jul 2018 19:07:12 GMT\nContent-Type: text\/html\nContent-Length: 194\nConnection: keep-alive\nLocation: https:\/\/your_domain\/\n\nHTTP\/2 200\nserver: nginx\/1.14.0 (Ubuntu)\ndate: Fri, 06 Jul 2018 19:07:12 GMT\ncontent-type: text\/html\ncontent-length: 16\nlast-modified: Fri, 06 Jul 2018 16:55:37 GMT\netag: \"5b3f9f09-10\"\naccept-ranges: bytes<\/pre>\n\n\n\n<p>It is also possible to verify that HTTP\/2 is running in Google Chrome. Launch Chrome and go to <strong>http:\/\/your_domain<\/strong>. Open the Chrome Developer Tools (<strong>View<\/strong> \u21d2 <strong>Developer<\/strong> \u21d2 <strong>Developer Tools),<\/strong> then reload the page (<strong>View<\/strong> \u21d2 <strong>Reload This Page<\/strong>). Go to the <strong>Network<\/strong> tab, right-click on the table header row starting with \u201c<strong>name\u201d<strong>,<\/strong><\/strong> then select the <strong>Protocol<\/strong> option from the pop-up menu.<\/p>\n\n\n\n<p>You will see <strong>h2<\/strong> (referring to HTTP\/2) in a new <strong>Protocol<\/strong> column, which indicates that HTTP\/2 is operational.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"745\" height=\"577\" src=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/pasted-image-0-1.png\" alt=\"HTTP\/2 Support on Ubuntu nginx\" class=\"wp-image-1312\" srcset=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/pasted-image-0-1.png 745w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/pasted-image-0-1-300x232.png 300w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/pasted-image-0-1-150x116.png 150w\" sizes=\"(max-width: 745px) 100vw, 745px\" \/><\/figure>\n\n\n\n<p>You\u2019re ready to serve content using the HTTP\/2 protocol by now. Let\u2019s move on to increasing security and performance by enabling HSTS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong><strong>Step 4 \u2014 Enabling HTTP Strict Transport Security (HSTS)<\/strong><\/strong><\/h3>\n\n\n\n<p>You can enable HTTP Strict Transport Security (HSTS) to avoid having to do redirects to HTTPS even if your HTTP requests include it. If the browser identifies an HSTS header, it will not attempt to connect to the server via regular HTTP again for a while. No matter what, it will use an encrypted HTTPS connection only to exchange data. This header also protects us from <a href=\"https:\/\/en.wikipedia.org\/wiki\/Downgrade_attack\">Downgrade attacks<\/a>.<\/p>\n\n\n\n<p>In your editor, go ahead and launch the Nginx configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">sudo nano \/etc\/nginx\/nginx.conf<\/code><\/pre>\n\n\n\n<p>Add this line to the file in order to activate HSTS:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">http {\n\n...\n\n    ##\n    # Virtual Host Configs\n    ##\n\n\n    include \/etc\/nginx\/conf.d\/*.conf;\n    include \/etc\/nginx\/sites-enabled\/*;\n    add_header Strict-Transport-Security \"max-age=15768000\" always;\n\n}\n\n...<\/pre>\n\n\n\n<p>The<strong> <kbd>max-age<\/kbd> <\/strong>is set in seconds. The value <strong><kbd>15768000<\/kbd> <\/strong>is equivalent to 6 months.<\/p>\n\n\n\n<p>This header is not added to subdomain requests by default. If you have subdomains and want them applied by HSTS, then add the <kbd><strong>includeSubDomains<\/strong><\/kbd> variable at the end of the line like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">add_header Strict-Transport-Security \"max-age=15768000; includeSubDomains\" always;<\/pre>\n\n\n\n<p>Exit the editor after saving the file.<\/p>\n\n\n\n<p>Check for syntax errors in the configuration this time too:<\/p>\n\n\n\n<pre class=\"wp-block-code ltr\"><code class=\"\">$ sudo nginx -t<\/code><\/pre>\n\n\n\n<p>Finally, to apply the changes, go ahead and restart the Nginx server&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo systemctl restart nginx<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>Your Nginx server is now serving HTTP\/2 pages. Run a test against your server if you want to test your SSL connection\u2019s strength.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nginx is known for its speed and reliability as an open-source web server. It is popular for its low memory requirements, high scalability, easy configuration, and support for many protocols. The Hypertext Transport Protocol is where HTTP\/2 recently originated from. The latter is used on the Web to deliver pages from server to browser. HTTP\/2 ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[69,4],"tags":[],"yoast_head":"\n<title>How To Setup Nginx with HTTP\/2 Support on Ubuntu 18.04 - WebHi Tutorials &amp; Documentations<\/title>\n<meta name=\"description\" content=\"We provide you with this guide that will help you use HTTP\/2 support to create a fast and secure Nginx server.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Setup Nginx with HTTP\/2 Support on Ubuntu 18.04 - WebHi Tutorials &amp; Documentations\" \/>\n<meta property=\"og:description\" content=\"We provide you with this guide that will help you use HTTP\/2 support to create a fast and secure Nginx server.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/\" \/>\n<meta property=\"og:site_name\" content=\"WebHi Tutorials &amp; Documentations\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webhi.technology\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-18T16:01:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-21T11:30:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/nginx_http2_ubuntu_en.jpg\" \/>\n<meta name=\"author\" content=\"webhi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@WebHiTechnology\" \/>\n<meta name=\"twitter:site\" content=\"@WebHiTechnology\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"webhi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/\"},\"author\":{\"name\":\"webhi\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54\"},\"headline\":\"How To Setup Nginx with HTTP\/2 Support on Ubuntu 18.04\",\"datePublished\":\"2022-07-18T16:01:00+00:00\",\"dateModified\":\"2022-07-21T11:30:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/\"},\"wordCount\":1218,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\"},\"articleSection\":[\"Linux system administration\",\"Web servers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/\",\"name\":\"How To Setup Nginx with HTTP\/2 Support on Ubuntu 18.04 - WebHi Tutorials &amp; Documentations\",\"isPartOf\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#website\"},\"datePublished\":\"2022-07-18T16:01:00+00:00\",\"dateModified\":\"2022-07-21T11:30:35+00:00\",\"description\":\"We provide you with this guide that will help you use HTTP\/2 support to create a fast and secure Nginx server.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webhi.com\/how-to\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Setup Nginx with HTTP\/2 Support on Ubuntu 18.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#website\",\"url\":\"https:\/\/www.webhi.com\/how-to\/\",\"name\":\"WebHi Tutorials &amp; Documentations\",\"description\":\"System administration and knowledge base\",\"publisher\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webhi.com\/how-to\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\",\"name\":\"WebHi Technology\",\"url\":\"https:\/\/www.webhi.com\/how-to\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png\",\"contentUrl\":\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png\",\"width\":288,\"height\":95,\"caption\":\"WebHi Technology\"},\"image\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webhi.technology\",\"https:\/\/twitter.com\/WebHiTechnology\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54\",\"name\":\"webhi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1780005063\",\"contentUrl\":\"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1780005063\",\"caption\":\"webhi\"},\"sameAs\":[\"https:\/\/www.webhi.com\/how-to\"],\"url\":\"https:\/\/www.webhi.com\/how-to\/author\/webhi\/\"}]}<\/script>\n","yoast_head_json":{"title":"How To Setup Nginx with HTTP\/2 Support on Ubuntu 18.04 - WebHi Tutorials &amp; Documentations","description":"We provide you with this guide that will help you use HTTP\/2 support to create a fast and secure Nginx server.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/","og_locale":"en_US","og_type":"article","og_title":"How To Setup Nginx with HTTP\/2 Support on Ubuntu 18.04 - WebHi Tutorials &amp; Documentations","og_description":"We provide you with this guide that will help you use HTTP\/2 support to create a fast and secure Nginx server.","og_url":"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/","og_site_name":"WebHi Tutorials &amp; Documentations","article_publisher":"https:\/\/www.facebook.com\/webhi.technology","article_published_time":"2022-07-18T16:01:00+00:00","article_modified_time":"2022-07-21T11:30:35+00:00","og_image":[{"url":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/nginx_http2_ubuntu_en.jpg"}],"author":"webhi","twitter_card":"summary_large_image","twitter_creator":"@WebHiTechnology","twitter_site":"@WebHiTechnology","twitter_misc":{"Written by":"webhi","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/#article","isPartOf":{"@id":"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/"},"author":{"name":"webhi","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54"},"headline":"How To Setup Nginx with HTTP\/2 Support on Ubuntu 18.04","datePublished":"2022-07-18T16:01:00+00:00","dateModified":"2022-07-21T11:30:35+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/"},"wordCount":1218,"commentCount":0,"publisher":{"@id":"https:\/\/www.webhi.com\/how-to\/#organization"},"articleSection":["Linux system administration","Web servers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/","url":"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/","name":"How To Setup Nginx with HTTP\/2 Support on Ubuntu 18.04 - WebHi Tutorials &amp; Documentations","isPartOf":{"@id":"https:\/\/www.webhi.com\/how-to\/#website"},"datePublished":"2022-07-18T16:01:00+00:00","dateModified":"2022-07-21T11:30:35+00:00","description":"We provide you with this guide that will help you use HTTP\/2 support to create a fast and secure Nginx server.","breadcrumb":{"@id":"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.webhi.com\/how-to\/how-to-setup-nginx-with-http-2-support-on-ubuntu-18-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webhi.com\/how-to\/"},{"@type":"ListItem","position":2,"name":"How To Setup Nginx with HTTP\/2 Support on Ubuntu 18.04"}]},{"@type":"WebSite","@id":"https:\/\/www.webhi.com\/how-to\/#website","url":"https:\/\/www.webhi.com\/how-to\/","name":"WebHi Tutorials &amp; Documentations","description":"System administration and knowledge base","publisher":{"@id":"https:\/\/www.webhi.com\/how-to\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webhi.com\/how-to\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webhi.com\/how-to\/#organization","name":"WebHi Technology","url":"https:\/\/www.webhi.com\/how-to\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/","url":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png","contentUrl":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png","width":288,"height":95,"caption":"WebHi Technology"},"image":{"@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webhi.technology","https:\/\/twitter.com\/WebHiTechnology"]},{"@type":"Person","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54","name":"webhi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/image\/","url":"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1780005063","contentUrl":"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1780005063","caption":"webhi"},"sameAs":["https:\/\/www.webhi.com\/how-to"],"url":"https:\/\/www.webhi.com\/how-to\/author\/webhi\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/252"}],"collection":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/comments?post=252"}],"version-history":[{"count":47,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/252\/revisions"}],"predecessor-version":[{"id":1446,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/252\/revisions\/1446"}],"wp:attachment":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/media?parent=252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/categories?post=252"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/tags?post=252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}