Nginx使用brotli
首先下载brotli的nginx模块 cd /opt/local/src git clone https://github.com/google/ngx_brotli.git 接着下载brotli源代码 cd ngx_brotli cd deps/brotli git clone https://github.com/google/brotli.git 编译nginx源代码指定第三方模块 ./configure --prefix=/opt/local/nginx --without-http_memcached_module --user=www --group=www --with-http_stub_status_module --with-openssl=/usr/ --with-pcre=/opt/local/src/pcre-8.36 --add-module=/opt/local/src/ngx_brotli 可能会报错,提示你 ./configure: error: Brotli library is missing from the /opt/local/src/ngx_brotli/deps/brotli directory. Please make sure that the git submodule has been checked out: cd /opt/local/src/ngx_brotli && git submodule update --init && cd /opt/local/src/nginx-1.12.1 照着它的提示操作就好了,网络不好的话需要等很长时间,这时候就是展现技术的时候了,你懂得 cd /opt/local/src/ngx_brotli && git submodule update --init && cd /opt/local/src/nginx-1.12.1 操作完以后,再一次编译nginx源码 ./configure --prefix=/opt/local/nginx --without-http_memcached_module --user=www --group=www --with-http_stub_status_module --with-openssl=/usr/ --with-pcre=/opt/local/src/pcre-8....