I need some help. I have enabled gzip
compression, but I also want to allow brotli
compression on my server. I followed many articles available on Google, but none of them helped me to install and enable **brotli
.
Did not work:-
https://serverfault.com/questions/957636/how-to-install-brotli-on-nginx-and-ubuntu-18-04
https://serverfault.com/questions/941767/enable-both-brotli-and-gzip-on-nginx
I followed all the articled by the digital ocean to install my LEMP stack and WordPress:-
https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-18-04
https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lemp-on-ubuntu-18-04
https://www.digitalocean.com/community/tutorials/how-to-add-the-gzip-module-to-nginx-on-ubuntu-16-04
I think there is no working tutorial available for brotli.
I also checked the official doc of Nginx
, but there is not enough information. I followed their doc to install brotli
, but that did not work for me.
If anyone here can tell me the best and clean method to enable brotli
. I will appreciate that.
You will need to compile Brotli from source. And you're right. There's almost no documentation on how to do this. I did this for my own server and I'm now running Brotli. :-)
You will need to either compile NGINX with Brotli, or compile a Brotli dynamic module and add to an already-built NGINX.
Here's the script I documented for the second choice: https://www.majlovesreg.one/adding-brotli-to-a-built-nginx-instance
Hope this helps you.