I installed and enabled the Brotli module just fine through SSH. Then, I added this to my port 80 VirtualHost config:
<IfModule mod_brotli.c>
SetOutputFilter BROTLI_COMPRESS
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-brotli
AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml text/css text/javascript application/javascript
</IfModule>
After restarting Apache, everything is still served via gzip and not Brotli. Specifically, I see content-encoding: gzip
for each text-based file, not content-encoding: br
as expected.
Edit: my headers include accept-encoding: gzip, deflate, br
so that can't be the problem.
Every tutorial that I've researched has very simple instructions yet gzip insists on being the preferred compression method no matter what I try. Going over the VirtualHost config files, I can't see anything about gzip or compression in them at all so it's odd that adding the above to those config files has no impact at all.