{"id":5076,"date":"2019-10-16T14:37:44","date_gmt":"2019-10-16T09:07:44","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=5076"},"modified":"2026-10-31T21:19:16","modified_gmt":"2026-10-31T15:49:16","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 HTTP\/2 Support in Apache"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Post Date: October 16, 2019<br>Last Updated: October 31, 2026<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">HTTP\/2 is a major revision of the HTTP protocol designed to improve website performance, reduce latency, and enable faster communication between web servers and browsers. It was developed by the Internet Engineering Task Force (IETF) and is based on Google&#8217;s earlier experimental SPDY protocol.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">HTTP\/2 introduces several improvements over HTTP\/1.1, including multiplexing, header compression, and more efficient resource loading. These enhancements help improve website loading speed and overall performance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this tutorial, we will explain how to enable HTTP\/2 support in Apache on a CentOS server and verify that it is working correctly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before enabling HTTP\/2 support in Apache, ensure that you have the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A server running CentOS 7.7<\/li>\n\n\n\n<li>Apache HTTP Server installed and running<\/li>\n\n\n\n<li>A website configured with Apache<\/li>\n\n\n\n<li>A valid SSL\/TLS certificate installed for your domain<\/li>\n\n\n\n<li>Root or sudo access to the server<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> HTTP\/2 is generally enabled over HTTPS in modern browsers. If your domain does not have an SSL certificate, install a Let&#8217;s Encrypt SSL certificate before proceeding.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Implementation<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">1. 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<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" width=\"603\" height=\"359\" data-id=\"5123\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-10-16-at-2.08.48-PM.png\" alt=\"\" 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>\n<\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">2. 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\">3. 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\">4. 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<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1024\" height=\"628\" data-id=\"5120\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/10\/Screen-Shot-2019-10-16-at-2.14.47-PM-1024x628.png\" alt=\"\" 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>\n<\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In this tutorial, we learned how to enable HTTP\/2 support in Apache by modifying the SSL virtual host configuration, verifying the Apache configuration syntax, and restarting the Apache service.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We also learned how to verify HTTP\/2 support using an online testing tool. Enabling HTTP\/2 can improve website performance through multiplexing, header compression, and more efficient communication between browsers and web servers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For more Apache configuration guides, HTTP\/2 tutorials, Linux server administration, web server optimization, and troubleshooting tips, visit <a href=\"https:\/\/pheonixsolutions.com\/blog?utm_source=chatgpt.com\">pheonixsolutions.com<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">FAQs<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. What is HTTP\/2?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">HTTP\/2 is the second major version of the HTTP protocol that improves website performance, reduces latency, and enables faster communication between web browsers and servers.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. What are the benefits of HTTP\/2?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">HTTP\/2 offers several benefits, including multiplexing, header compression, reduced latency, and improved website loading speed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Is SSL required to enable HTTP\/2 in Apache?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes, most modern web browsers support HTTP\/2 over HTTPS. Therefore, a valid SSL\/TLS certificate is recommended.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related Articles<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/redirect-http-to-https\/\">Redirect HTTP to HTTPS in Apache<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Need Help with Apache Configuration and HTTP\/2 Implementation?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Need help enabling HTTP\/2 in Apache, configuring SSL certificates, optimizing web server performance, or troubleshooting Apache-related issues? Our experts can assist with Apache installation, HTTP\/2 configuration, SSL implementation, web server optimization, Linux server administration, and other infrastructure requirements. Get in touch with our team <a href=\"https:\/\/pheonixsolutions.com\/contact?utm_source=chatgpt.com\">here<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Post Date: October 16, 2019Last Updated: October 31, 2026 Introduction HTTP\/2 is a major revision of the HTTP protocol designed [&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_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_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":1,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5076\/revisions"}],"predecessor-version":[{"id":12717,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5076\/revisions\/12717"}],"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}]}}