On October 19, 2021, we have enabled single-sign-on for our Plesk Support Center to provide a seamless login/account experience. This implies that you’ll be able to use a single account across any of our web-facing properties.
If you had already registered your account at Plesk 360 (formerly known as My Plesk) please use one for login. Otherwise please re-register it using the same email address as your existing Zendesk login (support account). It’s essential that you use the same email address on our support center to ensure that your tickets stay attached to the same account.

Does Plesk support BROTLI compression for Apache or Nginx web server?




  • Avatar
    Torsten Bulk

    Brodle is a must! I'm betting on Plesk to support it.

    Comment actions Permalink
  • Avatar
    Kingsley Felix

    Since you know the importance of this feature, why do we still have to vote for it?

    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Kingsley Felix,

    More popular feature is, the higher priority of adding this feature will be for the development team. 

    Comment actions Permalink
  • Avatar
    Anthony Forshaw

    Voting for Brotli compression also!  It should be more popular :)

    Comment actions Permalink
  • Avatar

    Voting for Brotli too!

    Is there any way to install by CLI ?
    I found one for PHP, one for Apache and one for NGINX.

    If yes, which one will work for PHP-FPM?

    Comment actions Permalink
  • Hello GetPageSpeed,

    Thanks for providing these instructions.

    Anyway, mind that in case of problems with Brotli module (or such configuration), we won't be supporting it until we officially provide it ourselves.


    DaliAbassi, please check out the previous message from GetPageSpeed.

    Comment actions Permalink
  • Avatar

    Thank you Francisco Garcia for your answer, but I'm using Ubuntu and the package from GetPageSpeed is for Centos/RHEL.

    Comment actions Permalink
  • Avatar
    Christoph Flathmann (Edited )

    You can compile a dynamic module yourself. As a temporary solution:

    Updated: added missing Step 9. (Run configure in ginx source directory)

    Best way is to run the steps below on your server. (Please keep a backup of your server or at least of your nginx config directory)
    You will not replace your nginx binary, this will just compile the ngx_brotli modul.
    If something goes wrong just delete the files that loads the module (Step 11. and 12.) or use backup config.

    Also Remember that you would have to rebuild this module once Plesk updates it's nginx server. 

    if nginx configure or make modules fail install missing libraries or take a look at https://talk.plesk.com/threads/how-to-compile-nginx-with-additional-modules-pagespeed-cache_purge-headers-more-and-others.340640/
    apt-get build-essential zlib1g-dev libpcre3 libpcre3-dev unzip

    1. Get your nginx Version (nginx -v).
      Output should be something like this nginx version: nginx/1.16.1
    2. Download the source of your version.
      wget https://nginx.org/download/nginx-1.16.1.tar.gz
    3. Extract the downloaded source:
      tar -xzvf nginx-1.16.1.tar.gz
    4. Get ngx_brotli:
      git clone https://github.com/google/ngx_brotli.git && cd ngx_brotli
      git submodule update --init --recursive
    5. run nginx -V to get your build variables. copy this to txt file or ceate a bash script.
    6. Add the path where your ngx_brotli folder is (Step 4.)
    7. remove following lines:
      --with-openssl=lib_openssl from your variables
    8. cd into your nginx source directory
    9. run ./configure with the variables from text file or via a bash script (Example https://gist.github.com/Chrissi2812/be8d22459a87b004ef6ab096533e7b34)
    10. run make modules this will create the modules in the objs directory
    11. copy ngx_http_brotli_filter_module.so and ngx_http_brotli_static_module.so from the objs directory
      to your nginx modules directory (/usr/share/nginx/modules)
    12. Create a new conf file to load the dynamic modules
      nano /etc/nginx/modules.conf.d/brotli.conf 
      With follwing content:
      load_module nginx/modules/ngx_http_brotli_filter_module.so;
      load_module nginx/modules/ngx_http_brotli_static_module.so;
    13. create /etc/nginx/conf.d/brotli.conf with follwing content (example taken from https://github.com/google/ngx_brotli#sample-configuration)
      brotli on;
      brotli_comp_level 6;
      brotli_static on;
      brotli_types application/atom+xml application/javascript application/json application/rss+xml
      application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype
      application/x-font-ttf application/x-javascript application/xhtml+xml application/xml
      font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon
      image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml;
    14. run nginx -t to verify the configuration
    15. run service nginx restart

    Now all static files should be served via brotli. Proxied requests don't seem to work.

    Maybe plesk could ad the dynamic compiled modules, just like pagespeed and passenger??

    Comment actions Permalink
  • Avatar
    Bragi Austfjord

    I don't get it.

    Could you explain this better "Add the path where of your ngx_brotli install"

    where? remove following lines:

    Please explain this better.

    Comment actions Permalink
  • Avatar
    Leonid Gukhman

    Bragi Austfjord

    Thank you for sharing this solution! It might be useful for other Pleskians, too.

    Comment actions Permalink
  • Avatar
    Sage Pointer

    Thank you Christoph Flathmann

    To me, on step 7 i also needed to remove these lines:
    Maybe it's because i compiled on the another machine, not on the prod server, but in the end everything worked without any problems

    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request