{"id":697,"date":"2019-09-05T11:40:55","date_gmt":"2019-09-05T11:40:55","guid":{"rendered":"https:\/\/cheapsslsecurity.com\/p\/?p=697"},"modified":"2020-04-02T12:10:44","modified_gmt":"2020-04-02T12:10:44","slug":"how-to-enable-http-2-on-nginx","status":"publish","type":"post","link":"https:\/\/cheapsslsecurity.com\/p\/how-to-enable-http-2-on-nginx\/","title":{"rendered":"Step-by-Step Guide: How to Enable HTTP\/2 on Nginx"},"content":{"rendered":"<p>Nginx, developed by Igor Sysoev, is a powerful web server that can perform other important tasks such as load balancing, serving as a mail proxy or reverse proxy, and HTTP caching. Although it\u2019s not as popular as Apache, Nginx is a more efficient web server in terms of resource allocation and efficiency.<\/p>\n<p><!--more--><\/p>\n<p>There are actually two different version of Nginx. Nginx is an open-source software, whereas Nginx Plus is the commercial version that comes with user support. Both software fully support HTTP\/2.<\/p>\n<p>To enable HTTP\/2 on Nginx, there are a few things to know:<\/p>\n<ul>\n<li>It\u2019s important to enable HTTPS on your server because almost all browsers allow HTTP\/2 only over HTTPS.<\/li>\n<li>TLS protocol version 1.2 and above with modern cipher suites is required.<\/li>\n<li>Nginx Open Source version 1.9.5 or higher has built-in support for HTTP\/2. Nginx Plus R7 and all higher versions fully support HTTP\/2.<\/li>\n<\/ul>\n<h2>How to Enable HTTP\/2 in Nginx<\/h2>\n<p>Let us look at how to enable http\/2 in Nginx server.<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>Make a backup of the nginx.conf file (default location: \/etc\/nginx\/nginx.conf).<\/li>\n<li>After that, modify the file by adding http2 under the listen directive.<br \/>\n<blockquote><p>&gt; listen 443 ssl http2;<\/p><\/blockquote>\n<\/li>\n<li>The SSL configuration needs to be updated, so ensure that it is added under server block which has SSL configuration since HTTP\/2 is only supported over HTTPS.<br \/>\n<blockquote><p>server {<br \/>\nlisten 443 ssl http2;<br \/>\nlisten [::]:443 ssl http2;<br \/>\nserver_name example.com;<br \/>\nroot \/path\/to\/public;<br \/>\nssl_certificate \/path\/to\/certificate.crt;<br \/>\nssl_certificate_key \/path\/to\/private.key;<br \/>\nssl_protocols TLSv1.2;<br \/>\n}<\/p><\/blockquote>\n<\/li>\n<li>Restart Nginx using the following command:<br \/>\n<blockquote><p>&gt; sudo systemctl reload nginx.service<\/p><\/blockquote>\n<\/li>\n<li>To verify that HTTP\/2 is enabled on the website, the addon HTTP\/2 Indicator, can be used on Firefox or the HTTP\/2 and SPDY Indicator can be used for Chrome.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Troubleshooting<\/h2>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>If the Nginx server is sitting behind a web application firewall, ensure that the web application firewall (WAF) is capable of parsing HTTP\/2 traffic.<\/li>\n<li>Ensure that the SPDY parameter is removed from all listen directives. Since Google deprecated SPDY in 2016, support for it has been withdrawn.<\/li>\n<li>If <a href=\"https:\/\/nginx.org\/en\/docs\/http\/ngx_http_ssl_module.html#ssl_prefer_server_ciphers\" target=\"_blank\" rel=\"noopener noreferrer\">ssl_prefer_server_ciphers<\/a> is set to on and\/or a list of ssl_ciphers defined in <a href=\"https:\/\/tools.ietf.org\/html\/rfc7540#appendix-A\" target=\"_blank\" rel=\"noopener noreferrer\">Appendix A: TLS 1.2 Cipher Suite Black List<\/a> is used, the client browser experiences handshake errors and will not work.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<div class=\"graysection\">\n<h2>Purchase a Multi-Domain Wildcard SSL Certificate from CheapSSLSecurity &amp; Save Up to 84%!<\/h2>\n<p>We offer the best discount on multi-domain wildcard SSL certificates starting as low as $148.18 per year.<\/p>\n<p><a class=\"comparebtn\" href=\"https:\/\/cheapsslsecurity.com\/sslproducts\/multi-domain-wildcard-ssl-certificates.html\">Shop All Multi-Domain Wildcard Certificates<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Nginx, developed by Igor Sysoev, is a powerful web server that can perform other important tasks such as load balancing, serving as a mail proxy or reverse proxy, and HTTP caching. Although it\u2019s not as popular as Apache, Nginx is &hellip; <a href=\"https:\/\/cheapsslsecurity.com\/p\/how-to-enable-http-2-on-nginx\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[19,33],"class_list":["post-697","post","type-post","status-publish","format-standard","hentry","category-ssl-advanced","tag-http2","tag-nginx"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Step-by-Step Guide: How to Enable HTTP\/2 on Nginx<\/title>\n<meta name=\"description\" content=\"Are you finding a guide to enable HTTP2 on Nginx web server? We got a comperhensive step-by-step instruction for this. Read now!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cheapsslsecurity.com\/p\/how-to-enable-http-2-on-nginx\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Step-by-Step Guide: How to Enable HTTP\/2 on Nginx\" \/>\n<meta property=\"og:description\" content=\"Are you finding a guide to enable HTTP2 on Nginx web server? We got a comperhensive step-by-step instruction for this. Read now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cheapsslsecurity.com\/p\/how-to-enable-http-2-on-nginx\/\" \/>\n<meta property=\"og:site_name\" content=\"Cheap SSL Security\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/CheapSSLSecurities\" \/>\n<meta property=\"article:published_time\" content=\"2019-09-05T11:40:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-04-02T12:10:44+00:00\" \/>\n<meta name=\"author\" content=\"casey.crane\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@sslsecurity\" \/>\n<meta name=\"twitter:site\" content=\"@sslsecurity\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"casey.crane\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/cheapsslsecurity.com\\\/p\\\/how-to-enable-http-2-on-nginx\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/cheapsslsecurity.com\\\/p\\\/how-to-enable-http-2-on-nginx\\\/\"},\"author\":{\"name\":\"casey.crane\",\"@id\":\"https:\\\/\\\/cheapsslsecurity.com\\\/p\\\/#\\\/schema\\\/person\\\/d9c1744bb0931c1942814061a5aca108\"},\"headline\":\"Step-by-Step Guide: How to Enable HTTP\\\/2 on Nginx\",\"datePublished\":\"2019-09-05T11:40:55+00:00\",\"dateModified\":\"2020-04-02T12:10:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/cheapsslsecurity.com\\\/p\\\/how-to-enable-http-2-on-nginx\\\/\"},\"wordCount\":416,\"keywords\":[\"http2\",\"NGINX\"],\"articleSection\":[\"SSL Advanced\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/cheapsslsecurity.com\\\/p\\\/how-to-enable-http-2-on-nginx\\\/\",\"url\":\"https:\\\/\\\/cheapsslsecurity.com\\\/p\\\/how-to-enable-http-2-on-nginx\\\/\",\"name\":\"Step-by-Step Guide: How to Enable HTTP\\\/2 on Nginx\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/cheapsslsecurity.com\\\/p\\\/#website\"},\"datePublished\":\"2019-09-05T11:40:55+00:00\",\"dateModified\":\"2020-04-02T12:10:44+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/cheapsslsecurity.com\\\/p\\\/#\\\/schema\\\/person\\\/d9c1744bb0931c1942814061a5aca108\"},\"description\":\"Are you finding a guide to enable HTTP2 on Nginx web server? We got a comperhensive step-by-step instruction for this. Read now!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/cheapsslsecurity.com\\\/p\\\/how-to-enable-http-2-on-nginx\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/cheapsslsecurity.com\\\/p\\\/how-to-enable-http-2-on-nginx\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/cheapsslsecurity.com\\\/p\\\/how-to-enable-http-2-on-nginx\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"SSL Help\",\"item\":\"https:\\\/\\\/cheapsslsecurity.com\\\/p\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SSL Advanced\",\"item\":\"https:\\\/\\\/cheapsslsecurity.com\\\/p\\\/ssl-advanced\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Step-by-Step Guide: How to Enable HTTP\\\/2 on Nginx\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/cheapsslsecurity.com\\\/p\\\/#website\",\"url\":\"https:\\\/\\\/cheapsslsecurity.com\\\/p\\\/\",\"name\":\"Cheap SSL Security\",\"description\":\"Shop for SSL Certificates at Cheap Prices\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/cheapsslsecurity.com\\\/p\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/cheapsslsecurity.com\\\/p\\\/#\\\/schema\\\/person\\\/d9c1744bb0931c1942814061a5aca108\",\"name\":\"casey.crane\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c18d819d34a1995e91a4aa7518e9048df7856f336a1ede2262a572db7b1c2506?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c18d819d34a1995e91a4aa7518e9048df7856f336a1ede2262a572db7b1c2506?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c18d819d34a1995e91a4aa7518e9048df7856f336a1ede2262a572db7b1c2506?s=96&d=mm&r=g\",\"caption\":\"casey.crane\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Step-by-Step Guide: How to Enable HTTP\/2 on Nginx","description":"Are you finding a guide to enable HTTP2 on Nginx web server? We got a comperhensive step-by-step instruction for this. Read now!","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:\/\/cheapsslsecurity.com\/p\/how-to-enable-http-2-on-nginx\/","og_locale":"en_US","og_type":"article","og_title":"Step-by-Step Guide: How to Enable HTTP\/2 on Nginx","og_description":"Are you finding a guide to enable HTTP2 on Nginx web server? We got a comperhensive step-by-step instruction for this. Read now!","og_url":"https:\/\/cheapsslsecurity.com\/p\/how-to-enable-http-2-on-nginx\/","og_site_name":"Cheap SSL Security","article_publisher":"https:\/\/www.facebook.com\/CheapSSLSecurities","article_published_time":"2019-09-05T11:40:55+00:00","article_modified_time":"2020-04-02T12:10:44+00:00","author":"casey.crane","twitter_card":"summary_large_image","twitter_creator":"@sslsecurity","twitter_site":"@sslsecurity","twitter_misc":{"Written by":"casey.crane","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/cheapsslsecurity.com\/p\/how-to-enable-http-2-on-nginx\/#article","isPartOf":{"@id":"https:\/\/cheapsslsecurity.com\/p\/how-to-enable-http-2-on-nginx\/"},"author":{"name":"casey.crane","@id":"https:\/\/cheapsslsecurity.com\/p\/#\/schema\/person\/d9c1744bb0931c1942814061a5aca108"},"headline":"Step-by-Step Guide: How to Enable HTTP\/2 on Nginx","datePublished":"2019-09-05T11:40:55+00:00","dateModified":"2020-04-02T12:10:44+00:00","mainEntityOfPage":{"@id":"https:\/\/cheapsslsecurity.com\/p\/how-to-enable-http-2-on-nginx\/"},"wordCount":416,"keywords":["http2","NGINX"],"articleSection":["SSL Advanced"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/cheapsslsecurity.com\/p\/how-to-enable-http-2-on-nginx\/","url":"https:\/\/cheapsslsecurity.com\/p\/how-to-enable-http-2-on-nginx\/","name":"Step-by-Step Guide: How to Enable HTTP\/2 on Nginx","isPartOf":{"@id":"https:\/\/cheapsslsecurity.com\/p\/#website"},"datePublished":"2019-09-05T11:40:55+00:00","dateModified":"2020-04-02T12:10:44+00:00","author":{"@id":"https:\/\/cheapsslsecurity.com\/p\/#\/schema\/person\/d9c1744bb0931c1942814061a5aca108"},"description":"Are you finding a guide to enable HTTP2 on Nginx web server? We got a comperhensive step-by-step instruction for this. Read now!","breadcrumb":{"@id":"https:\/\/cheapsslsecurity.com\/p\/how-to-enable-http-2-on-nginx\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cheapsslsecurity.com\/p\/how-to-enable-http-2-on-nginx\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/cheapsslsecurity.com\/p\/how-to-enable-http-2-on-nginx\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"SSL Help","item":"https:\/\/cheapsslsecurity.com\/p\/"},{"@type":"ListItem","position":2,"name":"SSL Advanced","item":"https:\/\/cheapsslsecurity.com\/p\/ssl-advanced\/"},{"@type":"ListItem","position":3,"name":"Step-by-Step Guide: How to Enable HTTP\/2 on Nginx"}]},{"@type":"WebSite","@id":"https:\/\/cheapsslsecurity.com\/p\/#website","url":"https:\/\/cheapsslsecurity.com\/p\/","name":"Cheap SSL Security","description":"Shop for SSL Certificates at Cheap Prices","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cheapsslsecurity.com\/p\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/cheapsslsecurity.com\/p\/#\/schema\/person\/d9c1744bb0931c1942814061a5aca108","name":"casey.crane","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c18d819d34a1995e91a4aa7518e9048df7856f336a1ede2262a572db7b1c2506?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c18d819d34a1995e91a4aa7518e9048df7856f336a1ede2262a572db7b1c2506?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c18d819d34a1995e91a4aa7518e9048df7856f336a1ede2262a572db7b1c2506?s=96&d=mm&r=g","caption":"casey.crane"}}]}},"_links":{"self":[{"href":"https:\/\/cheapsslsecurity.com\/p\/wp-json\/wp\/v2\/posts\/697","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cheapsslsecurity.com\/p\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cheapsslsecurity.com\/p\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cheapsslsecurity.com\/p\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/cheapsslsecurity.com\/p\/wp-json\/wp\/v2\/comments?post=697"}],"version-history":[{"count":0,"href":"https:\/\/cheapsslsecurity.com\/p\/wp-json\/wp\/v2\/posts\/697\/revisions"}],"wp:attachment":[{"href":"https:\/\/cheapsslsecurity.com\/p\/wp-json\/wp\/v2\/media?parent=697"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cheapsslsecurity.com\/p\/wp-json\/wp\/v2\/categories?post=697"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cheapsslsecurity.com\/p\/wp-json\/wp\/v2\/tags?post=697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}