Server optimization

Compress HTTP text output

Apache

Deflate/Gzip

Load the compression module:

 1#Load Deflate module
 2LoadModule deflate_module modules/mod_deflate.so
 3# DeflateAlterETag NoChange #optional, as Nextcloud supports this

Enable for the FileRun site:

 1<IfModule mod_deflate.c>
 2AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/json
 3</IfModule>

Brotli

 1#Load Brotli module
 2LoadModule brotli_module modules/mod_brotli.so
 3BrotliAlterETag NoChange

The BrotliAlterETag configuration is important so that e-tag headers do not get altered with the -br postfix, breaking the desktop sync protocol.

Hoping Nextcloud adds support also for Brotli-encoded content at some point: https://github.com/nextcloud/desktop/blob/master/src/libsync/helpers.cpp#L22

Enable for the FileRun site:

 1<IfModule mod_brotli.c>
 2AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml text/css text/javascript application/javascript application/json
 3</IfModule>