How do I implement Brotli compression in Apache?
Here is a quite nice guide how to add support for pre compressed static content to apache with fall-back to gzip
https://lyncd.com/2015/11/brotli-support-apache/
Update: Use the Apache mod_brotli
.
If your Apache is older, my answer from 2016 might be of interest:
2016 answer:
You could use the Apache module brotli_module
by kjdev which works well for me.
You might also want to check out the new mod_brotli
patch from Apache as suggested by Aeyoun. I haven't tried it myself, though.
Support for Brotli was just added as mod_brotli in Apache trunk, making Apache the first web server with Brotli support. Give it some time and you’ll be able to just enable the Brotli output filter as you would gzip and deflate in Apache. If you’re impatient, you can use the third-party brotli_module as suggested by Joe; or cherry pick the new mod_brotli patch from trunk and apply it to your 2.4.x installation.