google / ngx_brotli

NGINX module for Brotli compression
BSD 2-Clause "Simplified" License
2.08k stars 214 forks source link

the duplicate "brotli_ratio" #138

Open inverser-pro opened 1 year ago

inverser-pro commented 1 year ago

OS Debian 11.

OpenSSL v3.0.5+quic

nginx install:

auto/configure `nginx -V 2>&1 | sed "s/ \-\-/ \\\ \n\t--/g" | grep "\-\-" | grep -ve opt= -e param= -e build=` \
    --prefix=/etc/nginx \
    --sbin-path=/usr/sbin/nginx \
    --with-openssl=../openssl \
    --conf-path=/etc/nginx/nginx.conf \
    --http-log-path=/var/log/nginx/access.log \
    --error-log-path=/var/log/nginx/error.log \
    --with-pcre  \
    --lock-path=/var/lock/nginx.lock \
    --pid-path=/var/run/nginx.pid \
    --with-http_ssl_module \
    --with-http_image_filter_module=dynamic \
    --modules-path=/etc/nginx/modules \
    --with-http_v2_module \
    --with-stream=dynamic \
    --with-http_addition_module \
    --with-http_mp4_module  \
    --add-module=../ngx_brotli \
    --build=nginx-quic --with-debug  \
    --with-http_v3_module --with-stream_quic_module \
    --with-cc-opt="-I/src/boringssl/include" --with-ld-opt="-L/src/boringssl/build/ssl -L/src/boringssl/build/crypto"

Hello. I installed nginx. launched service nginx start

changed nginx.conf checked nginx -t

got an error nginx: [emerg] the duplicate "brotli_ratio" variable in /etc/nginx/nginx.conf:17

But the fact is that the nginx.conf configuration file is standard and there is no mention of brotli_ratio

/etc/nginx/nginx.conf

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;

    server {
        listen       80;
        server_name  localhost;
        location / {
            root   html;
            index  index.html index.htm;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
}

uname -mrs Linux 5.10.0-18-amd64 x86_64

inverser-pro commented 1 year ago

Perhaps you can suggest what could be the problem. However, most likely, the error occurred due to uninstalled boringssl

This commands (https://www.nginx.com/blog/our-roadmap-quic-http-3-support-nginx/):

RUN apt-get update && \
    apt-get install -y git gcc make g++ cmake perl libunwind-dev golang && \
    git clone https://boringssl.googlesource.com/boringssl && \
    mkdir boringssl/build && \
    cd boringssl/build && \
    cmake .. && \
    make

RUN apt-get install -y mercurial libperl-dev libpcre3-dev zlib1g-dev libxslt1-dev libgd-ocaml-dev libgeoip-dev && \
    hg clone https://hg.nginx.org/nginx-quic   && \
    hg clone http://hg.nginx.org/njs -r "0.6.2" && \
    cd nginx-quic && \
    hg update quic && \
    auto/configure `nginx -V 2>&1 | sed "s/ \-\-/ \\\ \n\t--/g" | grep "\-\-" | grep -ve opt= -e param= -e build=` \
        --prefix=/etc/nginx \
        --sbin-path=/usr/sbin/nginx \
        --with-openssl=../openssl \
        --conf-path=/etc/nginx/nginx.conf \
        --http-log-path=/var/log/nginx/access.log \
        --error-log-path=/var/log/nginx/error.log \
        --with-pcre  \
        --lock-path=/var/lock/nginx.lock \
        --pid-path=/var/run/nginx.pid \
        --with-http_ssl_module \
        --with-http_image_filter_module=dynamic \
        --modules-path=/etc/nginx/modules \
        --with-http_v2_module \
        --with-stream=dynamic \
        --with-http_addition_module \
        --with-http_mp4_module  \
        --add-module=../ngx_brotli \
        --build=nginx-quic --with-debug  \
        --with-http_v3_module --with-stream_quic_module \
        --with-cc-opt="-I/src/boringssl/include" --with-ld-opt="-L/src/boringssl/build/ssl -L/src/boringssl/build/crypto" && \
    make && make install