Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brotli config not recognized #2

Closed
kravietz opened this issue Oct 10, 2015 · 1 comment
Closed

brotli config not recognized #2

kravietz opened this issue Oct 10, 2015 · 1 comment

Comments

@kravietz
Copy link

My Nginx has the brotli module compiled in as a static module (with NGX_BROTLI_STATIC_MODULE_ONLY):

# /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.9.5
built by gcc 5.1.0 (Ubuntu 5.1.0-0ubuntu11~14.04.1) 
built with OpenSSL 1.0.1f 6 Jan 2014 (running with OpenSSL 1.0.2d 9 Jul 2015)
TLS SNI support enabled
configure arguments: --add-module=ngx_brotli --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_gzip_static_module --with-http_geoip_module --with-ipv6 --with-cc-opt='-fstack-protector-all -Wl,-z,relro -Wl,-z,now -fPIE -pie -D_FORTIFY_SOURCE=2 -O4 -flto -march=x86-64' --with-ld-opt='-fstack-protector-all -Wl,-z,relro -Wl,-z,now -fPIE -pie -O4 -flto' --with-cc=gcc-5

But the directive is not recognized in config:

root@99ab84326f5b:/webcookies# /usr/local/nginx/sbin/nginx -t -c /nginx/nginx.conf 
nginx: [emerg] unknown directive "brotli" in /nginx/nginx.conf:24
nginx: configuration file /nginx/nginx.conf test failed

The relevant portion of nginx.conf is:

http {
        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        server_tokens off;

        include /usr/local/nginx/conf/mime.types.default;
        default_type application/octet-stream;

        access_log /nginx/logs/access.log;
        error_log /nginx/logs/error.log;

        brotli on;
        gzip on;
        gzip_disable "msie6";
@PiotrSikora
Copy link
Contributor

Hi Pawel,
NGX_BROTLI_STATIC_MODULE_ONLY=1 doesn't compile ngx_brotli as a static module, but adds only ngx_brotli static module to nginx (and not ngx_brotli filter module, which depends on libbrotli).

This module adds only brotli_static directive, which can be used to serve pre-compressed files to clients supporting Brotli (Accept-Encoding: br).

Sorry if this is not clear enough from the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants