Would be good to have this on a wiki... In @eustas's fork I sent a PR to add some basic instructions in the README (https://github.com/eustas/ngx_brotli/pull/34) but it seems like that's not present in this repo. Would you like instructions in the repo, or would you prefer some docs somewhere?
This is the approach I took:
# Get this source code
cd /usr/local/src
git clone git://github.com/google/ngx_brotli.git
# Get the Nginx Debian package source code
cd /usr/local/src/
apt source nginx
cd nginx-1.x.x
# Find the ./configure line Nginx was compiled with
nginx -V
# Call `./configure` with the arguments from "configure arguments:" output above, **except** for the `--add-dynamic-module` ones, and append `--add-dynamic-module=../ngx_brotli` to the end
./configure --with-cc-opt='-g -O2 ....................... --add-dynamic-module=../ngx_brotli
# Build and copy build modules to the right place
make modules
cp objs/ngx_http_brotli_filter_module.so /usr/local/lib/nginx/modules/
cp objs/ngx_http_brotli_static_module.so /usr/local/lib/nginx/modules/
Enable by adding to /etc/nginx/modules-enabled/brotli-static.conf:
Would be good to have this on a wiki... In @eustas's fork I sent a PR to add some basic instructions in the README (https://github.com/eustas/ngx_brotli/pull/34) but it seems like that's not present in this repo. Would you like instructions in the repo, or would you prefer some docs somewhere?
This is the approach I took:
Enable by adding to
/etc/nginx/modules-enabled/brotli-static.conf
: