mod_brotli is Brotli compression module for Apache HTTPD Server.
Switch branches/tags
Nothing to show
Clone or download
Latest commit f01b0d8 Feb 18, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis Updated test script Jul 31, 2017
brotli @ 5b47699 Updated library Brotli v1.0.1 Sep 24, 2017
tests Updated httpd config for test Jul 31, 2017
.gitignore Added sources Apr 3, 2016
.gitmodules Added brotli submodule Mar 2, 2016
.travis.yml Updated TravisCI Jul 31, 2017
LICENSE Added sources Apr 3, 2016
Makefile.am Updated library Brotli v1.0.1 Sep 24, 2017
README.md Update README.md Feb 18, 2018
autogen.sh Fixed autogen.sh Sep 4, 2017
configure.ac Updated version to 0.5.0 Sep 24, 2017
mod_brotli.c Updated library Brotli v1.0.1 Sep 24, 2017

README.md

mod_brotli

NOTE: Please use the official module since Apache 2.4.26 : Apache Module mod_brotli

Build Status

mod_brotli is a Brotli compression module for Apache HTTPD Server.

Requires

Build

git clone --depth=1 --recursive https://github.com/kjdev/apache-mod-brotli.git
cd apache-mod-brotli
./autogen.sh
./configure
make

Install

install -p -m 755 -D .libs/mod_brotli.so /etc/httpd/modules/mod_brotli.so

Configuration

httpd.conf:

# Load module
LoadModule brotli_module modules/mod_brotli.so

<IfModule brotli_module>
  # Output filter
  AddOutputFilterByType BROTLI text/html text/plain text/css text/xml

  # SetOutputFilter BROTLI
  # SetEnvIfNoCase Request_URI \.txt$ no-br

  # Compression
  ## BrotliCompressionLevel: 0-11 (default: 11)
  BrotliCompressionLevel 10

  ## BrotliWindowSize: 10-24 (default: 22)
  BrotliWindowSize 22

  # Specifies how to change the ETag header when the response is compressed
  ## BrotliAlterEtag: AddSuffix, NoChange, Remove (default: AddSuffix)
  BrotliAlterEtag AddSuffix

  # Filter note
  BrotliFilterNote Input  brotli_in
  BrotliFilterNote Output brotli_out
  BrotliFilterNote Ratio  brotli_ratio

  LogFormat '"%r" %{brotli_out}n/%{brotli_in}n (%{brotli_ratio}n)' brotli
  CustomLog logs/access_log brotli
</IfModule>