How to Install and Configure Brotli Compression on CentOS

Configure Brotli Compression on CentOS

Looking to speed up website load time? After spending days making your site get better results using GTMetrix and Google’s PageSpeed tests, you may have seen requests to compress your site. 

If you’re on a VPS or Dedicated server you can go beyond just doing the gzip / mod_deflate compression on your sites. This guide will be walking you through how to install the Brotli Compression on your WHM. 

Before you begin the install process, complete a backup of your account so recovery can be made if needed. Also, your site will be shut down Brotli is being added. Consider enabling maintenance mode before starting the process.

Is Brotli Compression on CentOS already installed on your server? 

If you have switched to our build of NGINX on your server, you may already have Brotli installed on it. KeyCDN has a tool that will let you know if it’s installed on your server already. 

Visit https://tools.keycdn.com/brotli-test and give it one of the URLs on your server.  

If its already installed, the tool should reply back with something like the following:

Yes Brotli is installed

If it’s not already installed you will see the following:

No Brotli is not installed

Install Brotli Compression via EasyApache 4

To install the Brotli Compression using EasyApache 4 you would just need to do the following steps:

  1. Log into WHM as root
  2. Choose Software >> EasyApache 4 
    choose easy apache
  3. Click on Customize in the “Currently Installed Packages”
    customize easy apache 4
  4. Choose Apache Modules
    Search for brotli Module
  5. Search for mod_brotli and set it to Install
    choose brotli module
  6. Then click on Review
    Reviw Brotli module
  7. Click on Provision
    Provision brotli module

After its done Provisioning, you can verify its installed by checking again with https://tools.keycdn.com/brotli-test 

Install Brotli Compression via SSH

If you would rather SSH into your server, instead of using EasyApache 4, then you will need to:

  1. SSH into your server as root
  2. Run: yum install ea-apache24-mod_brotli
  3. Reply Y to “Is this ok [y/d/N]:

While installing it this way it will show recent Log Messages, this can be ignored as long as at the end it shows something like:

brotil installed with ssh

Check Your Installation

If after installing Brotli Compression on CentOS the site still fails the test, make sure the domain has an SSL installed. 

Refer to our Guide to SSLs and AutoSSLs or contact us via Chat / Phone to have an SSL installed for you. 

Configuring Brotli Compression

There are no configuration options in cPanel or WHM for what the Brotli Compression will process. However if you’re an advanced user you can modify what it compresses by modifying the file /etc/apache2/conf.d/brotli.conf. 

Congratulations! You now know how to install, check and configure Brotli Compression on CentOS using WHM. Check out our article if you want to learn more about the Brotli Compression Algorithm.  

Upgrade to VPS Hosting for Peak Performance

Upgrade to InMotion VPS Hosting today for top-notch performance, security, and flexibility, and save up to $2,412 – a faster, stronger hosting solution is just a click away!

check markSSD Storage check markHigh-Availability check markIronclad Security check markPremium Support

VPS Hosting

InMotion Hosting Contributor
InMotion Hosting Contributor Content Writer

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

Was this article helpful? Join the conversation!

Questions about our MailChannels Deployment? We have answers and are here to help!Learn More
+