Wo in der Standardumgebung kommt brotli eigentlich zum Einsatz? Im Apache httpd ja nicht, oder?
Brotli
-
-
Das Modul mod_brotli.so (/usr/local/pd-admin2/httpd-2.4/modules/mod_brotli.so) ist zumindest vorhanden, ob es geladen wird, kannst du wie folgt ermitteln: /usr/local/pd-admin2/bin/httpd -M |grep -i brotli
-
mod_brotli ist eine moderne Variante https traffic zu komprimieren. Im Prinzip wie mod_deflate, aber auf SSL Verbindungen optimiert.
Man kann es parallel zu mod_deflate einsetzen. Ich habe dazu folgende Zeilen in das Template eingefügt:
Code
Alles anzeigenLoadModule brotli_module modules/mod_brotli.so <Location /> SetOutputFilter BROTLI_COMPRESS;DEFLATE BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html SetEnvIfNoCase Request_URI \ \.(?:gif|jpe?g|png|mp3|mp4|swf)$ no-gzip dont-vary Header append Vary User-Agent env=!dont-vary </Location> <IfModule brotli_module> AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/css text/xml AddOutputFilterByType BROTLI_COMPRESS text/css AddOutputFilterByType BROTLI_COMPRESS application/x-javascript application/javascript AddOutputFilterByType BROTLI_COMPRESS application/rss+xml AddOutputFilterByType BROTLI_COMPRESS application/xml AddOutputFilterByType BROTLI_COMPRESS application/json </IfModule>Keine Ahnung, ob es optimal ist, aber mit dieser Konfiguration performt meine Nextcloud Instanz jedenfalls sehr ordentlich.
Kleiner Hinweis:
mod_brotli braucht im Gegensatz zu mod_deflate etwas mehr Rechenpower. Bei mir etwa 0,10% mehr ... also vertretbar, aber das sollte man in Abhängigkeit der eigenen Server-Hardware zumindest anfangs beobachten. -
Bei der gepatchten Sicherheitslücke in Brotli kann ja letztendlich auch ein bösartiger Server einen Client kompromittieren. Das hatte ich bei meiner Frage eingangs gar nicht am Schirm.
Wordfence hat da einen ganz interessanten Artikel geschrieben, wie man das durch einen Request an eine Standard Wordpress xmlrpc.php zum Beispiel triggern könnte.https://www.wordfence.com/blog/2026/11/http2shell-wordpress-brotli/