precompress static files

Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
Zoey
2026-08-08 22:36:39 +02:00
parent da782248f1
commit 26ec46a6a7
4 changed files with 27 additions and 0 deletions
+22
View File
@@ -17,6 +17,28 @@ Listen 8000
<Proxy "fcgi://${NEXTCLOUD_HOST}:9000" flushpackets=on>
</Proxy>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP:Accept-Encoding} br
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}.br -s
RewriteRule ^ %{REQUEST_URI}.br [END]
</IfModule>
<IfModule mod_mime.c>
AddEncoding br .br
</IfModule>
<IfModule mod_headers.c>
<FilesMatch "\.(css|js|mjs|svg|ico)\.br$">
<If "%{QUERY_STRING} =~ /(^|&)v=/">
Header set Cache-Control "max-age=15778463, immutable"
</If>
<Else>
Header set Cache-Control "max-age=15778463"
</Else>
</FilesMatch>
</IfModule>
# Nextcloud dir
DocumentRoot /var/www/html/
<Directory /var/www/html/>