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?