cPanel / WHM

Install HTTP/2 with Easy Apache 4 (EA4) cPanel/WHM

Install HTTP/2 with Easy Apache 4 (EA4) cPanel/WHM


The mod_http2 Apache module provides HTTP/2 support for the Apache HTTP server.


This module can increase the loading speed and security of your web pages. To obtain these benefits, you must adjust your server’s configuration.


HTTP/2 is resource intensive and can increase your server’s memory usage.

You can edit the mod_http2 Apache module’s .conf file at the following location:


For more configuration information, read Apache’s mod_http2 documentation.

Requirement to enable HTTP/2 in EA4:

This module requires EasyApache 4 and Apache 2.4.


The mod_http2 Apache module is not compatible with the following modules:

  • mod_mpm_itk
  • mod_mpm_prefork (the Prefork MPM)
The mod_http2 Apache module is not compatible with 32-bit CentOS 6 systems.

How to install or uninstall mod_http2

In the interface

The easiest way to install or uninstall the mod_http2 Apache module is to use WHM’s EasyApache 4 interface (Home >> Software >> EasyApache 4).

On the command line

To install the  mod_http2 Apache module in EasyApache 4, run the following command on the command line:

yum install ea-apache24-mod_http2

To uninstall the mod_http2 Apache module in EasyApache 4, run the following command on the command line:

yum remove ea-apache24-mod_http2

article source:

See also our article:

How to install Google Pagespeed on Easy Apache 4 (EA4)

How to install Google Pagespeed on Easy Apache 4 (EA4)

How to install Google Pagespeed on Easy Apache 4

The PageSpeed modules are open-source server modules that optimize your site automatically.

If you haven’t guessed it, this module directly complements Google’s PageSpeed Insights. It’s a great tool for giving you feedback on what can be done to optimize your site. What I’ve found is many of the issues this tool reports back to you can be resolved automatically by the PageSpeed module , Simply by installing it. Google can tell you what needs to be optimized and how to optimize it, so why not let them do it for you?

Combine/minify CSS & JavaScript
Flatten CSS @imports
Optimize images
Extend cache
Collapse Whitespace
Lazily Load Images
Move CSS to Head
Move CSS Above Scripts

Installation Procedure (CentOS):

yum install rpm-build cpio ea-apache24-mod_version
rpmbuild --rebuild ea-apache24-mod_pagespeed-latest-stable.src.rpm
rpm -ivh /root/rpmbuild/RPMS/x86_64/ea-apache24-mod_pagespeed*.rpm
/etc/init.d/httpd restart or service httpd restart

Note: 1- if you get following error on Step 3 :
“RPM build errors:
File must begin with “/”: %{_httpd_moddir}/*.so
File must begin with “/”: %{_httpd_modconfdir}/*.conf”

Just create a file named “macros.apache2″ in ‘/etc/rpm/ directory and paste the below content into that and then restart from step 3.

 %_httpd_mmn 20120211x8664
 %_httpd_apxs /usr/bin/apxs
 %_httpd_dir /etc/apache2
 %_httpd_bindir %{_httpd_dir}/bin
 %_httpd_modconfdir %{_httpd_dir}/conf.modules.d
 %_httpd_confdir %{_httpd_dir}/conf.d
 %_httpd_contentdir /usr/share/apache2
 %_httpd_moddir /usr/lib64/apache2/modules

2- you may face following error:
“rpmbuild –rebuild ea-apache24-mod_pagespeed-latest-stable.src.rpm
Installing ea-apache24-mod_pagespeed-latest-stable.src.rpm
error: ea-apache24-mod_pagespeed-latest-stable.src.rpm cannot be installed” 

Just look at your screen , go 1 step back and check the downloaded file name in some case may be different most of people just run ”  rpmbuild –rebuild ea-apache24-mod_pagespeed-latest-stable.src.rpm” command but sometimes file name can be different for example may be file saved as ea-apache24-mod_pagespeed-latest-stable.src.rpm.9 so in this case you should change file name in command before running that for above example just add .9 in end of command
  rpmbuild –rebuild ea-apache24-mod_pagespeed-latest-stable.src.rpm.9

Now Login into your WHM panel > Software > EasyApache4 and look for “mod_pagespeed” option and enable it after that restart apache again and run insight  then check your website speed performance!

Configuring Google mod_pagespeed

The installation script will copy “pagespeed.conf” file into ” /usr/local/apache/conf/ ” or “ /etc/apache2/conf.modules.d” on your server. Please consult the following pages to customize your mod_pagespeed configuration:

mod_pagespeed module configuration
configuring mod_pagespeed filters

For example of the different filters in action and detailed documentation for each, please see

How to install Google Pagespeed on Easy Apache 4 Tutorial from: