Brotli support in cPanel/EasyApache 4

Brotli is a data format specification for data streams compressed with a specific combination of the general-purpose LZ77 lossless compression algorithm, Huffman coding and 2nd order context modelling.

You can get into Brotli details on the Wikipedia page at https://en.wikipedia.org/wiki/Brotli

In simple terms, Brotli is similar to the gzip web compression. It was developed by Google. As of the present date, Brotli is supported by all major web browsers – Microsoft Edge, Google Chrome, Mozilla Firefox, Opera, and Safari.

Also, Brotli is supported by web servers – Apache HTTP Server (w/ mod_brotli module), nginx (w/ ngx_brotli module), LiteSpeed Web Server, Node.js (w/ shrink-ray community module) .
cURL supports Brotli since version 7.57 (November 2017).

cpanel brotli1
EasyApache brotli support

To enable Brotli on your cPanel/WHM server:

  1. Log in to your WHM panel as root.
  2. Navigate to Software->EasyApache 4
  3. Click the Customize button
  4. Now on the Apache Modules tab, search and select mod_brotli.
  5. Click the Next button few times and in the end click Provision button.
  6. You will see the confirmation message The provision process is complete.

You can also add support for Brotli via the command line:

root@web [~]# yum install ea-apache24-mod_brotli.x86_64

Check if your site uses Brotli at https://tools.keycdn.com/brotli-test In our case the result is:

Brotli test page

The Content-encoding header will be:

Content-Encoding: br

This Post Has One Comment

  1. طراحی سایت تهران

    my site seems that does not compress text data . i use cpanel web host service. is thre anay way to compress text data with out a direct access to server . my website : site tehran

Leave a Reply