0

I'm running an apache 2.4.54 with broti enabled.

brotli configuration as seen below and loaded before default deflate configuration.

$ cat /etc/apache2/mods-available/brotli.conf
<IfModule mod_brotli.c>
        AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript application/json application/x-font-ttf application/vnd.ms-fontobject image/x-icon
</IfModule>

It all works well for CSS, JS and static HTML-files, but brotli is never used for requests answered by PHP, unless the client exclusively allows br only (Accept-Encoding: br). The same behaviour was documented already here https://www.spinics.net/lists/apache-users/msg120040.html but with no sensible conclusion.

PHP files are handled with proxy_cgi:

    <FilesMatch \.php$>
        SetHandler "proxy:fcgi://localhost:9005"
    </FilesMatch>

What could be the reason?

M Klein
  • 101
  • 1
  • I assume due th htaccess tag that apache is being used. sofar I found a [guide](https://bytepursuits.com/apache-enabling-brotli-compression-with-gzip-deflate-fallback) that may work for you – djdomi Jun 22 '22 at 17:05
  • @djdomi Thanks, but I followed that one already. And as you can see above we have that configuration already in place. The guide does not cover anything related to handlers though. That's why I'm asking here. – M Klein Jun 24 '22 at 07:47

0 Answers0