diff --git a/Containers/apache/Dockerfile b/Containers/apache/Dockerfile index c96e5470..0e9c5ec1 100644 --- a/Containers/apache/Dockerfile +++ b/Containers/apache/Dockerfile @@ -45,6 +45,7 @@ RUN set -ex; \ -e 's/^#\(LoadModule .*mod_authz_core.so\)/\1/' \ -e 's/^#\(LoadModule .*mod_alias.so\)/\1/' \ -e 's/^#\(LoadModule .*mod_mpm_event.so\)/\1/' \ + -e 's/^#\(LoadModule .*mod_brotli.so\)/\1/' \ -e 's/\(LoadModule .*mod_mpm_worker.so\)/#\1/' \ -e 's/\(LoadModule .*mod_mpm_prefork.so\)/#\1/' \ /usr/local/apache2/conf/httpd.conf; \ diff --git a/Containers/apache/nextcloud.conf b/Containers/apache/nextcloud.conf index e4523c14..b580cb59 100644 --- a/Containers/apache/nextcloud.conf +++ b/Containers/apache/nextcloud.conf @@ -10,6 +10,13 @@ Listen 8000 SetHandler "proxy:fcgi://${NEXTCLOUD_HOST}:9000" + + # Enable Brotli compression for js files + + AddOutputFilterByType BROTLI_COMPRESS text/javascript application/javascript application/x-javascript + BrotliCompressionQuality 0 + + # Nextcloud dir DocumentRoot /var/www/html/ diff --git a/readme.md b/readme.md index 54f0863c..85e2db17 100644 --- a/readme.md +++ b/readme.md @@ -28,6 +28,7 @@ Included are: - PHP and web server timeouts set to 3600s, [adjustable](https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud) (important for big file uploads) - Defaults to a max of 512 MB RAM per PHP process, [adjustable](https://github.com/nextcloud/all-in-one#how-to-adjust-the-php-memory-limit-for-nextcloud) - Automatic TLS included (by using Let's Encrypt) +- Brotli compression enabled by default for javascript files which reduces Nextcloud load times - HTTP/2 and HTTP/3 enabled - "Pretty URLs" for Nextcloud are enabled by default (removes the index.php from all links) - Video previews work out of the box and when Imaginary is enabled, many recent image formats as well!