Discover Centmin Mod today
Register Now

Nginx Nginx - ngx_brotli

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by buik, Jun 5, 2016.

  1. rdan

    rdan Well-Known Member

    4,741
    1,144
    113
    May 25, 2014
    Ratings:
    +1,711
    Local Time:
    6:23 PM
    Mainline
    10.2

     
  2. eva2000

    eva2000 Administrator Staff Member

    42,375
    9,568
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,746
    Local Time:
    8:23 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    ok so not related to those settings
     
  3. Sunka

    Sunka Well-Known Member

    1,107
    301
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +488
    Local Time:
    11:23 AM
    Nginx 1.15.8
    MariaDB 10.3.12
    Same thing as Roldan's was on my forum.
    I did as they suggest Roldan and now it working as it should be.
    Right now I recompile nginx for newest Brotli version

    Untitled.png
     
    • Informative Informative x 1
  4. Sunka

    Sunka Well-Known Member

    1,107
    301
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +488
    Local Time:
    11:23 AM
    Nginx 1.15.8
    MariaDB 10.3.12
    Lol, after recompiling nginx because new version of Brotli:

    Code:
    configuring additional modules
    adding module in ../nginx-module-vts
    + ngx_http_vhost_traffic_status_module was configured
    adding module in ../ngx_cache_purge-2.3
    + ngx_http_cache_purge_module was configured
    adding module in ../ngx_devel_kit-0.3.0
    + ngx_devel_kit was configured
    adding module in ../set-misc-nginx-module-0.31
    found ngx_devel_kit for ngx_set_misc; looks good.
    + ngx_http_set_misc_module was configured
    adding module in ../echo-nginx-module-0.60
    + ngx_http_echo_module was configured
    adding module in ../redis2-nginx-module-0.13
    + ngx_http_redis2_module was configured
    adding module in ../ngx_http_redis-0.3.7
    + ngx_http_redis_module was configured
    adding module in ../memc-nginx-module-0.17
    + ngx_http_memc_module was configured
    adding module in ../srcache-nginx-module-0.31
    + ngx_http_srcache_filter_module was configured
    adding module in ../headers-more-nginx-module-0.31
    + ngx_http_headers_more_filter_module was configured
    configuring additional dynamic modules
    adding module in ../ngx_brotli
    checking for Brotli library ... not found
    checking for Brotli library in /usr/local/ ... not found
    checking for Brotli library in /usr/pkg/ ... not found
    checking for Brotli library in /opt/local/ ... not found
    ./configure: error: ngx_brotli filter module requires Brotli library.
    
    Sun Aug 21 22:43:22 CEST 2016
    Error: 1, Nginx configure failed
    
    Total Nginx Upgrade Time: 162.504159814 seconds

     
  5. eva2000

    eva2000 Administrator Staff Member

    42,375
    9,568
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,746
    Local Time:
    8:23 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    looks like libbrotli failed to compile.. can you grab the nginx_upgrade log from /root/centminlogs for that run and post to pastebin.com or gist.github.com so can check it out
     
  6. eva2000

    eva2000 Administrator Staff Member

    42,375
    9,568
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,746
    Local Time:
    8:23 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    only diff i can see from my forums is IIRC you both using PHP 7 ? while I am still on PHP 5.6.x
     
    • Like Like x 2
  7. Sunka

    Sunka Well-Known Member

    1,107
    301
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +488
    Local Time:
    11:23 AM
    Nginx 1.15.8
    MariaDB 10.3.12
  8. eva2000

    eva2000 Administrator Staff Member

    42,375
    9,568
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,746
    Local Time:
    8:23 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    libbrotli library failed to compile and it's needed by ngx_brotli
    Code (Text):
    install libbrotli
    test -z "libbrotlidec.la libbrotlienc.la" || rm -f libbrotlidec.la libbrotlienc.la
    rm -f ./so_locations
    rm -rf .libs _libs
    rm -rf brotli/dec/.libs brotli/dec/_libs
    rm -rf brotli/enc/.libs brotli/enc/_libs
    rm -f *.o
    rm -f brotli/dec/*.o
    rm -f brotli/dec/*.lo
    rm -f brotli/enc/*.o
    rm -f brotli/enc/*.lo
    rm -f *.lo
    No local changes to save
    From https://github.com/bagder/libbrotli
       77a0db1..ccb89e1  master     -> origin/master
    Fetching submodule brotli
    From https://github.com/google/brotli
       e0a8763..2e0d321  master     -> origin/master
    * [new branch]      v0.5       -> origin/v0.5
    * [new tag]         v0.5.2     -> v0.5.2
    Updating 77a0db1..ccb89e1
    Fast-forward
    Makefile.am | 46 ++++++++++++++++++++++++++++------------------
    brotli      |  2 +-
    2 files changed, 29 insertions(+), 19 deletions(-)
    Submodule path 'brotli': checked out '2e0d3214c2b6248a486822d2c5267d1c961a29d0'
    libtoolize: putting auxiliary files in `.'.
    libtoolize: linking file `./ltmain.sh'
    libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
    libtoolize: linking file `m4/libtool.m4'
    libtoolize: linking file `m4/ltoptions.m4'
    libtoolize: linking file `m4/ltsugar.m4'
    libtoolize: linking file `m4/ltversion.m4'
    libtoolize: linking file `m4/lt~obsolete.m4'
    
    ----------------------------------------------------------------
    Initialized build system. For a common configuration please run:
    ----------------------------------------------------------------
    
    ./configure
    
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking how to print strings... printf
    checking for gcc... ccache /usr/bin/gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether ccache /usr/bin/gcc accepts -g... yes
    checking for ccache /usr/bin/gcc option to accept ISO C89... none needed
    checking for a sed that does not truncate output... /bin/sed
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for fgrep... /bin/grep -F
    checking for ld used by ccache /usr/bin/gcc... /bin/ld
    checking if the linker (/bin/ld) is GNU ld... yes
    checking for BSD- or MS-compatible name lister (nm)... /bin/nm -B
    checking the name lister (/bin/nm -B) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 1572864
    checking whether the shell understands some XSI constructs... yes
    checking whether the shell understands "+="... yes
    checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
    checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
    checking for /bin/ld option to reload object files... -r
    checking for objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for dlltool... no
    checking how to associate runtime and link libraries... printf %s\n
    checking for ar... ar
    checking for archiver @FILE support... @
    checking for strip... strip
    checking for ranlib... ranlib
    checking for gawk... gawk
    checking command to parse /bin/nm -B output from ccache /usr/bin/gcc object... ok
    checking for sysroot... no
    checking for mt... no
    checking if : is a manifest tool... no
    checking how to run the C preprocessor... ccache /usr/bin/gcc -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if ccache /usr/bin/gcc supports -fno-rtti -fno-exceptions... no
    checking for ccache /usr/bin/gcc option to produce PIC... -fPIC -DPIC
    checking if ccache /usr/bin/gcc PIC flag -fPIC -DPIC works... yes
    checking if ccache /usr/bin/gcc static flag -static works... no
    checking if ccache /usr/bin/gcc supports -c -o file.o... yes
    checking if ccache /usr/bin/gcc supports -c -o file.o... (cached) yes
    checking whether the ccache /usr/bin/gcc linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... yes
    checking for a BSD-compatible install... /bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking whether make sets $(MAKE)... yes
    checking for style of include used by make... GNU
    checking whether make supports nested variables... yes
    checking dependency style of ccache /usr/bin/gcc... gcc3
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking whether make supports nested variables... (cached) yes
    checking whether we are using the GNU C++ compiler... yes
    checking whether ccache /usr/bin/g++ accepts -g... yes
    checking how to run the C++ preprocessor... ccache /usr/bin/g++ -E
    checking for ld used by ccache /usr/bin/g++... /bin/ld -m elf_x86_64
    checking if the linker (/bin/ld -m elf_x86_64) is GNU ld... yes
    checking whether the ccache /usr/bin/g++ linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking for ccache /usr/bin/g++ option to produce PIC... -fPIC -DPIC
    checking if ccache /usr/bin/g++ PIC flag -fPIC -DPIC works... yes
    checking if ccache /usr/bin/g++ static flag -static works... no
    checking if ccache /usr/bin/g++ supports -c -o file.o... yes
    checking if ccache /usr/bin/g++ supports -c -o file.o... (cached) yes
    checking whether the ccache /usr/bin/g++ linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking dynamic linker characteristics... (cached) GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking dependency style of ccache /usr/bin/g++... gcc3
    checking that generated files are newer than configure... done
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating libbrotlienc.pc
    config.status: creating libbrotlidec.pc
    config.status: creating config.h
    config.status: config.h is unchanged
    config.status: executing libtool commands
    config.status: executing depfiles commands
    make  all-am
    make[1]: Entering directory `/svr-setup/libbrotli'
      CC       brotli/dec/libbrotlidec_la-bit_reader.lo
      CC       brotli/dec/libbrotlidec_la-decode.lo
      CC       brotli/dec/libbrotlidec_la-huffman.lo
      CC       brotli/dec/libbrotlidec_la-state.lo
    make[1]: *** No rule to make target `brotli/enc/backward_references.cc', needed by `brotli/enc/libbrotlienc_la-backward_references.lo'.  Stop.
    make[1]: *** Waiting for unfinished jobs....
    make[1]: Leaving directory `/svr-setup/libbrotli'
    make: *** [all] Error 2
      CC       brotli/common/libbrotlidec_la-dictionary.lo
      CCLD     libbrotlidec.la
    make: *** No rule to make target `brotli/enc/backward_references.cc', needed by `brotli/enc/libbrotlienc_la-backward_references.lo'.  Stop.
    

    No idea why it failed so might need to check with GitHub - bagder/libbrotli: meta project to build libraries from the brotli source code
     
  9. eva2000

    eva2000 Administrator Staff Member

    42,375
    9,568
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,746
    Local Time:
    8:23 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    @Sunka what happens if you delete the /svr-setup/libbrotli source directory first then re-run centmin.sh menu option 4 to have it re-created
    Code (Text):
    rm -rf /svr-setup/libbrotli
     
  10. Sunka

    Sunka Well-Known Member

    1,107
    301
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +488
    Local Time:
    11:23 AM
    Nginx 1.15.8
    MariaDB 10.3.12
    Shoud I do
    Code:
    cd /svr-setup
    rm -rf /svr-setup/libbrotli
    And then recompile nginx again?
     
  11. eva2000

    eva2000 Administrator Staff Member

    42,375
    9,568
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,746
    Local Time:
    8:23 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    yup
     
  12. Sunka

    Sunka Well-Known Member

    1,107
    301
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +488
    Local Time:
    11:23 AM
    Nginx 1.15.8
    MariaDB 10.3.12
    Recompiling is in process :penguin:
     
    • Like Like x 1
  13. Sunka

    Sunka Well-Known Member

    1,107
    301
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +488
    Local Time:
    11:23 AM
    Nginx 1.15.8
    MariaDB 10.3.12
    Is now OK?

    Code:
    Mon Aug 22 00:21:41 CEST 2016
    Success: Nginx was installed properly
    
    /usr/local/nginx/conf/conf.d/demodomain.com.conf
    /usr/local/nginx/conf/conf.d/phpmyadmin_ssl.conf
    /usr/local/nginx/conf/conf.d/pijanitvor.com.ssl.conf
    /usr/local/nginx/conf/conf.d/ssl.conf
    /usr/local/nginx/conf/conf.d/virtual.conf
    /usr/local/nginx/conf/conf.d/phpmyadmin_ssl.conf:29:        #####################add_header Alternate-Protocol  443:npn-spdy/3;
    /usr/local/nginx/conf/conf.d/phpmyadmin_ssl.conf:32:        #####################spdy_headers_comp 5;
    /usr/local/nginx/conf/conf.d/pijanitvor.com.ssl.conf:31:  #######################add_header Alternate-Protocol  443:npn-spdy/3;
    /usr/local/nginx/conf/conf.d/pijanitvor.com.ssl.conf:35:  #######################spdy_headers_comp 5;
    ---
    /usr/local/nginx/conf/conf.d/phpmyadmin_ssl.conf:3:        listen 443 ssl http2;
    /usr/local/nginx/conf/conf.d/phpmyadmin_ssl.conf:29:        #####################add_header Alternate-Protocol  443:npn-spdy/3;
    /usr/local/nginx/conf/conf.d/phpmyadmin_ssl.conf:32:        #####################spdy_headers_comp 5;
    /usr/local/nginx/conf/conf.d/pijanitvor.com.ssl.conf:15:  listen 443 ssl http2;
    /usr/local/nginx/conf/conf.d/pijanitvor.com.ssl.conf:31:  #######################add_header Alternate-Protocol  443:npn-spdy/3;
    /usr/local/nginx/conf/conf.d/pijanitvor.com.ssl.conf:35:  #######################spdy_headers_comp 5;
    Restarting nginx (via systemctl):  [  OK  ]
       _   _         _                 ____  _                                   
      | \ | |  __ _ (_) _ __  __  __  / ___|| |  ___   __ _  _ __   _   _  _ __ 
      |  \| | / _` || || '_ \ \ \/ / | |    | | / _ \ / _` || '_ \ | | | || '_ \
      | |\  || (_| || || | | | >  <  | |___ | ||  __/| (_| || | | || |_| || |_) |
      |_| \_| \__, ||_||_| |_|/_/\_\  \____||_| \___| \__,_||_| |_| \__,_|| .__/
              |___/                                                       |_|   
    
    dynamic module directory at /usr/local/nginx/modules
    total 2.9M
    drwxr-xr-x  2 root root 4.0K Aug 22 00:21 .
    drwxr-xr-x 10 root root 4.0K Feb 10  2016 ..
    -rwxr-xr-x  1 root root 124K Aug 22 00:21 ngx_http_brotli_filter_module.so
    -rwxr-xr-x  1 root root  98K Aug  2 19:36 ngx_http_brotli_filter_module.so.old
    -rwxr-xr-x  1 root root 114K Aug 22 00:21 ngx_http_brotli_static_module.so
    -rwxr-xr-x  1 root root 114K Aug  2 19:36 ngx_http_brotli_static_module.so.old
    -rwxr-xr-x  1 root root 141K Aug 22 00:21 ngx_http_fancyindex_module.so
    -rwxr-xr-x  1 root root 141K Aug  2 19:36 ngx_http_fancyindex_module.so.old
    -rwxr-xr-x  1 root root 140K Aug 22 00:21 ngx_http_image_filter_module.so
    -rwxr-xr-x  1 root root 140K Aug  2 19:36 ngx_http_image_filter_module.so.old
    -rwxr-xr-x  1 root root 927K Aug 22 00:21 ngx_stream_module.so
    -rwxr-xr-x  1 root root 928K Aug  2 19:36 ngx_stream_module.so.old
    
    *************************************************
    * nginx updated
    *************************************************
       _   _         _                _   _             _         _             _
      | \ | |  __ _ (_) _ __  __  __ | | | | _ __    __| |  __ _ | |_  ___   __| |
      |  \| | / _` || || '_ \ \ \/ / | | | || '_ \  / _` | / _` || __|/ _ \ / _` |
      | |\  || (_| || || | | | >  <  | |_| || |_) || (_| || (_| || |_|  __/| (_| |
      |_| \_| \__, ||_||_| |_|/_/\_\  \___/ | .__/  \__,_| \__,_| \__|\___| \__,_|
              |___/                         |_|                                   
    Total Nginx Upgrade Time: 305.807906414 seconds
     
  14. eva2000

    eva2000 Administrator Staff Member

    42,375
    9,568
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,746
    Local Time:
    8:23 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    need to see the nginx_upgrade log in /root/centminlogs for the install libbrotli part but looks good that nginx compiled fine
     
  15. Sunka

    Sunka Well-Known Member

    1,107
    301
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +488
    Local Time:
    11:23 AM
    Nginx 1.15.8
    MariaDB 10.3.12
  16. eva2000

    eva2000 Administrator Staff Member

    42,375
    9,568
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,746
    Local Time:
    8:23 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x