{"id":5076,"date":"2019-10-16T14:37:44","date_gmt":"2019-10-16T09:07:44","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=5076"},"modified":"2019-10-16T14:38:28","modified_gmt":"2019-10-16T09:08:28","slug":"how-to-enable-http2-support-in-apache","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/how-to-enable-http2-support-in-apache\/","title":{"rendered":"How to enable HTTP2 support in Apache"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">How to enable HTTP2 support in Apache <\/h4>\n\n\n\n<h4 class=\"wp-block-heading\">Date posted: 25\/09\/2019<\/h4>\n\n\n\n<h4 class=\"wp-block-heading\">Objective:-<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">HTTP\/2 is a major revision of the HTTP network protocol used by the World Wide Web. It was derived from the earlier experimental SPDY protocol, originally developed by Google. HTTP\/2 was developed by the Hypertext Transfer Protocol working group httpbis of the Internet Engineering Task Force.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ref link &#8211; <a href=\"https:\/\/developers.google.com\/web\/fundamentals\/performance\/http2\/\" target=\"_blank\" rel=\"noopener\">https:\/\/developers.google.com\/web\/fundamentals\/performance\/http2\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this article, we&#8217;re going to explain about enabling http2 protocol for your website.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Prerequisite :<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">CentOS 7.7<br>Apache<br>Website with SSL installed<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If your domain doesn&#8217;t use SSL already, please make sure to install Let&#8217;s Encrypt Free SSL on your domain. <\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Step1: Enable http2 in apache ssl configuration <\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">To enable HTTP\/2 protocol, you need to edit existing SSL configuration. In CentOS you can find the file at <em><strong>\/etc\/httpd\/conf\/httpd-le-ssl.conf<\/strong><\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Add the following line inside virtual host directive<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Protocols h2 h2c http\/1.1<\/pre>\n\n\n\n<ul class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\"><li class=\"blocks-gallery-item\"><figure><img fetchpriority=\"high\" decoding=\"async\" width=\"603\" height=\"359\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-10-16-at-2.08.48-PM.png\" alt=\"\" data-id=\"5123\" data-link=\"https:\/\/pheonixsolutions.com\/blog\/?attachment_id=5123\" class=\"wp-image-5123\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-10-16-at-2.08.48-PM.png 603w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-10-16-at-2.08.48-PM-300x179.png 300w\" sizes=\"(max-width: 603px) 100vw, 603px\" \/><\/figure><\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Step2: Verify Syntax<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># apachectl -t&lt;br> Syntax OK<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Step3: Restart Apache<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">systemctl restart httpd<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Step4: Verify HTTP\/2 Support<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">There is an awesome website where you can verify the website is supporting HTTP\/2 or not.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/http2.pro\" target=\"_blank\" rel=\"noopener\">https:\/\/http2.pro<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For instance https:\/\/google.com output as follows<\/p>\n\n\n\n<ul class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex\"><li class=\"blocks-gallery-item\"><figure><img decoding=\"async\" width=\"1024\" height=\"628\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-10-16-at-2.14.47-PM-1024x628.png\" alt=\"\" data-id=\"5120\" data-link=\"https:\/\/pheonixsolutions.com\/blog\/?attachment_id=5120\" class=\"wp-image-5120\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-10-16-at-2.14.47-PM-1024x628.png 1024w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-10-16-at-2.14.47-PM-300x184.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-10-16-at-2.14.47-PM-768x471.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-10-16-at-2.14.47-PM.png 1183w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Thanks for using&nbsp;<a href=\"https:\/\/pheonixsolutions.com\/\">pheonix solutions<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Did you find this tutorial helpful? Please do share with your friends.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to enable HTTP2 support in Apache Date posted: 25\/09\/2019 Objective:- HTTP\/2 is a major revision of the HTTP network [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1022],"tags":[278,161,718,261],"class_list":["post-5076","post","type-post","status-publish","format-standard","hentry","category-web-architecture","tag-apache","tag-centos","tag-http2","tag-linux","psol-cat-web-architecture"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-1jS","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5076","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=5076"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5076\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=5076"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=5076"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=5076"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}