Discover Centmin Mod today
Register Now

Nginx enable zstd in nginx

Discussion in 'Install & Upgrades or Pre-Install Questions' started by fablab, Sep 30, 2024.

  1. fablab

    fablab New Member

    21
    2
    3
    May 23, 2020
    Ratings:
    +6
    Local Time:
    9:23 AM
    1.25.3
    MariaDB-server-10.4.31-1.el7.centos.x86_64
    Greetings Team,

    • CentOS Version: AlmaLinux 8.10 (Linux 4.18.0-513.5.1.el8_9.x86_64)
    • Centmin Mod Version Installed: 131.00stable
      Code (Text):
      131.00stable.b054 #Mon Sep 30 03:17:31 UTC 2024
    • Nginx Version Installed: 1.27.1
      Code (Text):
      nginx version: nginx/1.27.1 (300924-031941-almalinux8-hyperv-8acf698-br-a71f931)
      built by gcc 12.2.1 20221121 (Red Hat 12.2.1-7) (GCC)
      built with OpenSSL 1.1.1k  FIPS 25 Mar 2021
      TLS SNI support enabled
      configure arguments: --with-ld-opt='-Wl,-E -L/usr/local/zlib-cf/lib -L/usr/local/nginx-dep/lib -ljemalloc -Wl,-z,relro,-z,now -Wl,-rpath,/usr/local/zlib-cf/lib:/usr/local/nginx-dep/lib -pie -fuse-ld=gold' --with-cc-opt='-I/usr/local/zlib-cf/include -I/usr/local/nginx-dep/include -m64 -march=x86-64-v4 -mavx -mavx2 -mpclmul -msse4 -msse4.1 -msse4.2 -fPIC -g -O3 -fstack-protector-strong -fuse-ld=gold --param=ssp-buffer-size=4 -Wformat -Wno-pointer-sign -Wimplicit-fallthrough=0 -Wno-cast-align -Wno-implicit-function-declaration -Wno-builtin-declaration-mismatch -Wno-deprecated-declarations -Wno-int-conversion -Wno-unused-result -Wno-vla-parameter -Wno-maybe-uninitialized -Wno-return-local-addr -Wno-array-parameter -Wno-alloc-size-larger-than -Wno-address -Wno-array-bounds -Wno-discarded-qualifiers -Wno-stringop-overread -Wno-stringop-truncation -Wno-missing-field-initializers -Wno-unused-variable -Wno-format -Wno-error=unused-result -Wno-missing-profile -Wno-stringop-overflow -Wno-free-nonheap-object -Wno-discarded-qualifiers -Wno-bad-function-cast -Wno-dangling-pointer -Wno-array-parameter -fcode-hoisting -Wno-cast-function-type -Wno-format-extra-args -Wp,-D_FORTIFY_SOURCE=2' --prefix=/usr/local/nginx --sbin-path=/usr/local/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --build=300924-031941-almalinux8-hyperv-8acf698-br-a71f931 --with-compat --without-pcre2 --with-http_stub_status_module --with-http_secure_link_module --with-libatomic --with-http_gzip_static_module --add-dynamic-module=../ngx_brotli --with-http_sub_module --with-http_addition_module --with-http_image_filter_module=dynamic --with-http_geoip_module --with-stream_geoip_module --with-stream_realip_module --with-stream_ssl_preread_module --with-threads --with-stream --with-stream_ssl_module --with-http_realip_module --add-dynamic-module=../ngx-fancyindex-0.5.2 --add-module=../ngx_cache_purge-2.5.3 --add-dynamic-module=../ngx_devel_kit-0.3.2 --add-dynamic-module=../set-misc-nginx-module-0.33 --add-dynamic-module=../echo-nginx-module-0.63 --add-module=../redis2-nginx-module-0.15 --add-module=../ngx_http_redis-0.4.0-cmm --add-module=../memc-nginx-module-0.20 --add-module=../srcache-nginx-module-0.33 --add-dynamic-module=../headers-more-nginx-module-0.37 --with-pcre-jit --with-zlib=../zlib-cloudflare-1.3.3 --with-zlib-opt=-fPIC --with-http_ssl_module --with-http_v2_module
      
    • PHP Version Installed: 8.0.30
      Code (Text):
      PHP 8.0.30 (cli) (built: Sep 28 2024 14:15:36) PGO ( NTS )
      Copyright (c) The PHP Group
      Zend Engine v4.0.30, Copyright (c) Zend Technologies
      
    • MariaDB MySQL Version Installed: 10.4.34
      Code (Text):
      mysqladmin  Ver 9.1 Distrib 10.4.34-MariaDB, for Linux on x86_64
      Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
      
      Server version          10.4.34-MariaDB
      Protocol version        10
      Connection              Localhost via UNIX socket
      UNIX socket             /var/lib/mysql/mysql.sock
      Uptime:                 26 days 17 hours 55 min 21 sec
      
      Threads: 8  Questions: 44945441  Slow queries: 35  Opens: 355  Flush tables: 1  Open tables: 182  Queries per second avg: 19.449
      
      
    • When was last time updated Centmin Mod code base ? : yesterday
    • Persistent Config: yes
      Code (Text):
      [03:32][root@MWEUVWEBPL01 ~]# cat /etc/centminmod/custom_config.inc
      CENTOS_ALPHATEST='y'
      NGINX_VERSION='1.25.3'
      NGINX_ONETWOTHREE_COMPAT='y'
      DEVTOOLSETTEN='n'
      DEVTOOLSETELEVEN='n'
      DEVTOOLSETTWELVE='y'
      DEVTOOLSETTHIRTEEN='n'
      SELFSIGNEDSSL_ECDSA='y'
      PHPFINFO='y'
      PHP_OVERWRITECONF='y'
      PYTHON_INSTALL_ALTERNATIVES='y'
      NGINX_ZERODT='y'
      
      MARCH_TARGETNATIVE='n'
      PUREFTPD_DISABLED='y'
      NGINX_SSLCACHE_ALLOWOVERRIDE='y'
      NGINX_STAPLE_CACHE_OVERRIDE='y'
      NGINX_STAPLE_CACHE_TTL='86400'
      SET_DEFAULT_MYSQLCHARSET='utf8mb4'
      AUTOHARDTUNE_NGINXBACKLOG='y'
      ZSTD_LOGROTATE_NGINX='y'
      ZSTD_LOGROTATE_PHPFPM='y'
      LETSENCRYPT_DETECT='y'
      DUALCERTS='y'
      SELFSIGNEDSSL_ECDSA='y'
      NGINX_LIBBROTLI='y'
      NGXDYNAMIC_BROTLI='y'
      #NGINX_ZSTD='y'
      #NGXDYNAMIC_ZSTD='y'
      #PHP_PGO_ALWAYS='y'
      PHP_PGO='y'
      PHP_BROTLI='y'
      PHP_LZFOUR='y'
      PHP_LZF='y'
      PHP_ZSTD='y'
      DMOTD_PHPCHECK='y'
      PHPFINFO='y'
      WPCLI_CE_QUERYSTRING_INCLUDED='y'
      

    I couldn't find the instructions to enable zstd on nginx on my centminmod stable version
    I have brotli working though.
    I tried adding
    Code (Text):
    NGINX_ZSTD='y'
    NGXDYNAMIC_ZSTD='y'
    

    to /etc/centminmod/custom_config.inc , but that nginx didn't compile properly.
    Code (Text):
     nginx -t && nprestart
    nginx: [emerg] dlopen() "/usr/local/nginx/modules/ngx_http_zstd_filter_module.so" failed (/usr/local/nginx/modules/ngx_http_zstd_filter_module.so: cannot open shared object file: No such file or directory) in /usr/local/nginx/conf/dynamic-modules.conf:12
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
    


    What would be right way to do get zstd working ?
    thanks.

     
  2. eva2000

    eva2000 Administrator Staff Member

    53,567
    12,136
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,679
    Local Time:
    4:23 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+