Nextcloud Ignoring Brotli Apache2 Module

I am on Ubuntu 20.04 server, running NC24.04, with Apache2 with a Virtulamin Pro 7.1

I enabled the brotli compression module for apache2 and it appears to be functioning correctly for all websites on my server, except for nextcloud.

When I run curl -I -H 'Accept-Encoding: br' https://example.test I correctly get the following results that verify brotli compression is being used.

HTTP/2 200 
x-powered-by: PHP/7.4.30
x-ua-compatible: IE=edge
x-pingback: https://example.test/xmlrpc.php
x-litespeed-tag: 89d1_HTTP.200
link: <https://example.test/index.php/wp-json/>; rel="", <https://example.test/index.php/wp-json/wp/v2/pages/4613>; rel="alternate"; type="application/json", <https://example.test/>; rel=shortlink
strict-transport-security: max-age=63072000
referrer-policy: no-referrer-when-downgrade
vary: Accept-Encoding
content-encoding: br    <<<<------------ brotli compression confirmation
x-frame-options: SAMEORIGIN
x-xss-protection: 1;mode=block
x-content-type-options: nosniff
content-length: 1
content-type: text/html; charset=UTF-8
date: Mon, 22 Aug 2022 04:37:23 GMT

When I run curl -I -H 'Accept-Encoding: br' https://nextcloud.test, I get the following results:

HTTP/2 302 
expires: Thu, 19 Nov 1981 08:52:00 GMT
cache-control: no-store, no-cache, must-revalidate
pragma: no-cache
content-security-policy: default-src 'self'; script-src 'self' 'nonce-My9rUzRLbHpDejM3MHh5TE1SYit4blRZZjQxekVEdU5hQzRiZWpZaHhBaz06dklrcnArWTJiQXk4dldYUlhsblJua2VDTWQ4QkltdmRFV3hkVDNBV2psRT0='; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *; object-src 'none'; base-uri 'self';
set-cookie: oc_sessionPassphrase=yEU9ckJ%2FY6sS%2BRnY4QhYz0vpFegHjuSdf3pL0RFYACeJ4SLgPpn28N5%2BOogPJA2fTfYymC2Q2l9ApU%2Bc8Ne8BW2ICXbHNFBFh0A2idnxFzv%2FkCWb8QZBnRkEPvX08wPI; path=/; secure; HttpOnly; SameSite=Lax
set-cookie: ocybmgmnlq2r=fb19sdnqeagmdtolhggueaffss; path=/; secure; HttpOnly; SameSite=Lax
set-cookie: __Host-nc_sameSiteCookielax=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax
set-cookie: __Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict
strict-transport-security: max-age=63072000
referrer-policy: no-referrer
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-permitted-cross-domain-policies: none
x-robots-tag: none
x-xss-protection: 1; mode=block
location: https://nextcloud.test/index.php/login
content-type: text/html; charset=UTF-8
date: Mon, 22 Aug 2022 06:04:03 GMT

There is no confirmation of brotli compression usage…

How can I confirm whether Nextcloud is or isn’t using the properly configured brotli compression module for apache2?



try Brotli Test - Verify Brotli Compression Support | KeyCDN Tools and you would have a real test

@stratege1401 Thanks for that… but it seems that the mystery deepens…

That test says that my is NOT sending brotli… However, it also says none of my other websites are sending brotli, whereas url -I -H 'Accept-Encoding: br' confirms that brotli IS being used… outputting `content-encoding: br

So now the question is who do I believe? But both test consistently say isn’t running brotli


@stratege1401 you may want to re-think using that tool…

I just did a header check on and it returned content-encoding: br, confirming brotli is running… whereas the actual brotlie test failed…

yes, i tested it too, same as you… inconsistency for CDNtools