From ccad3bc98c9b080a023a8af005aa4f29273acaf2 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 20 May 2023 23:27:20 +0200 Subject: [PATCH 1/3] enable brotli compression for js files in Nextcloud Signed-off-by: Simon L --- Containers/apache/Dockerfile | 1 + Containers/apache/nextcloud.conf | 7 +++++++ 2 files changed, 8 insertions(+) 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/ From 5e581d89f11bcca9936ac39d5fde3f37e77fe72e Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 22 May 2023 13:02:36 +0200 Subject: [PATCH 2/3] add as feature to readme Signed-off-by: Simon L --- readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.md b/readme.md index f0e4a14f..eb10d7c9 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 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! From fc47aa468a3d0ee39823e25360eabaef85ff6d1b Mon Sep 17 00:00:00 2001 From: Simon L Date: Tue, 30 May 2023 11:27:39 +0200 Subject: [PATCH 3/3] improve wording Signed-off-by: Simon L Signed-off-by: Simon L. --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index eb10d7c9..71307150 100644 --- a/readme.md +++ b/readme.md @@ -28,7 +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 load times +- 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!