NGINX Documentation


Brotli is a general‑purpose, lossless data compression algorithm that uses a variant of the LZ77 algorithm, Huffman coding, and second‑order context modeling. Its compression ratio is comparable to the best currently available general‑purpose compression methods. Its speed is similar to DEFLATE but with denser compression.

Installation Instructions

  1. Install the Brotli module.

    For Ubuntu:

    $ apt-get install nginx-plus-module-brotli

    For SLES:

    $ zypper install nginx-plus-module-brotli
  2. Put the following directive in the top‑level (“main”) context of the main NGINX Plus configuration file, /etc/nginx/nginx.conf:

    load_module modules/;
    load_module modules/;
  3. Perform additional configuration as required by the module.

  4. Reload NGINX Plus to enable the module:

    $ nginx -t && nginx -s reload