Merge pull request #2576 from nextcloud/enh/2574/content-encoding

enable compression for js files in Nextcloud
This commit is contained in:
Simon L 2023-05-30 11:27:47 +02:00 committed by GitHub
commit 16514bf07f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View file

@ -45,6 +45,7 @@ RUN set -ex; \
-e 's/^#\(LoadModule .*mod_authz_core.so\)/\1/' \ -e 's/^#\(LoadModule .*mod_authz_core.so\)/\1/' \
-e 's/^#\(LoadModule .*mod_alias.so\)/\1/' \ -e 's/^#\(LoadModule .*mod_alias.so\)/\1/' \
-e 's/^#\(LoadModule .*mod_mpm_event.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_worker.so\)/#\1/' \
-e 's/\(LoadModule .*mod_mpm_prefork.so\)/#\1/' \ -e 's/\(LoadModule .*mod_mpm_prefork.so\)/#\1/' \
/usr/local/apache2/conf/httpd.conf; \ /usr/local/apache2/conf/httpd.conf; \

View file

@ -10,6 +10,13 @@ Listen 8000
<FilesMatch "\.php$"> <FilesMatch "\.php$">
SetHandler "proxy:fcgi://${NEXTCLOUD_HOST}:9000" SetHandler "proxy:fcgi://${NEXTCLOUD_HOST}:9000"
</FilesMatch> </FilesMatch>
# Enable Brotli compression for js files
<IfModule mod_brotli.c>
AddOutputFilterByType BROTLI_COMPRESS text/javascript application/javascript application/x-javascript
BrotliCompressionQuality 0
</IfModule>
# Nextcloud dir # Nextcloud dir
DocumentRoot /var/www/html/ DocumentRoot /var/www/html/
<Directory /var/www/html/> <Directory /var/www/html/>

View file

@ -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) - 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) - 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) - 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 - HTTP/2 and HTTP/3 enabled
- "Pretty URLs" for Nextcloud are enabled by default (removes the index.php from all links) - "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! - Video previews work out of the box and when Imaginary is enabled, many recent image formats as well!