Current Default: Nginx 1.29.6
Default across all branches (132.00stable, 140.00beta01, 141.00beta01). Compiled from source with OpenSSL 1.1.1w and Cloudflare-optimized zlib.
HTTP/2 & HTTP/3 QUIC Support
Centmin Mod Nginx is compiled with full HTTP/2 support enabled by default, including HPACK encoding for header compression. HTTP/3 QUIC support is available as an optional feature.
HTTP/3 QUIC Options
For HTTP/3 QUIC support, Centmin Mod provides three SSL library choices:
- quicTLS — OpenSSL 1.1.1w+quic fork (default QUIC option)
- BoringSSL — Google’s fork of OpenSSL (
BORINGSSL_SWITCH='y') - AWS-LC — Amazon’s cryptographic library (
AWS_LC_SWITCH='y')
Enable HTTP/3 QUIC in /etc/centminmod/custom_config.inc:
NGINX_QUIC_SUPPORT='y'
Note
AWS-LC takes priority over quicTLS when both are enabled. The OpenResty set-misc module is not compatible with BoringSSL builds.
Enabled Modules (Default)
These modules are compiled and enabled by default in every Centmin Mod Nginx build:
| Module | Type | Description |
|---|---|---|
| http_v2_module | Static | HTTP/2 protocol with HPACK encoding |
| http_ssl_module | Static | HTTPS/TLS support |
| http_realip_module | Static | Real IP detection behind proxies/CDN |
| http_stub_status_module | Static | Server statistics and monitoring |
| http_sub_module | Static | Response body string substitution |
| http_addition_module | Static | Append/prepend text to responses |
| http_gzip_static_module | Static | Pre-compressed static file serving |
| ngx_cache_purge | Static | FastCGI/proxy cache purge support |
| ngx_http_redis | Static | Redis protocol support for caching |
| ngx_fancyindex | Dynamic | Fancy directory listing |
| headers-more | Dynamic | Set/clear input and output headers |
| ngx_brotli | Dynamic | Brotli compression (on-the-fly & static) |
| ngx_image_filter | Dynamic | On-the-fly image resizing/cropping |
| set-misc-nginx | Dynamic | Extended set directives (base64, hashing) |
| echo-nginx | Dynamic | Shell-style echo/sleep/time in configs |
| lua-nginx-module | Dynamic | OpenResty Lua scripting engine |
| ngx_devel_kit | Dynamic | Development kit for 3rd-party modules |
| GeoIP (legacy) | Static | MaxMind GeoIP country/city lookups |
| http_secure_link_module | Static | URL verification via hashed links |
| stream_module | Static | TCP/UDP proxy and load balancing (with stream_ssl) |
| stream_ssl_preread_module | Static | SSL/TLS info extraction without terminating |
Disabled/Optional Modules
These modules can be enabled via /etc/centminmod/custom_config.inc before running a Nginx upgrade (Menu 4):
| Module | Variable | Description |
|---|---|---|
| PageSpeed (Deprecated) | NGINX_PAGESPEED='y' | Google PageSpeed optimization module (Deprecated — no longer supported) |
| WebDAV | NGINX_WEBDAV='y' | WebDAV protocol support |
| RTMP | NGINX_RTMP='y' | RTMP live streaming |
| njs | NGXDYNAMIC_NJS='y' | Nginx JavaScript scripting |
| GeoIP2 | NGINX_GEOIPTWOLITE='y' | MaxMind GeoIP2 Lite database support |
| ModSecurity | NGINX_MODSECURITY='y' | Web application firewall (WAF) |
| VTS | NGINX_VHOSTSTATS='y' | Virtual host traffic status monitoring |
| testcookie | NGXDYNAMIC_TESTCOOKIE='y' | Bot detection via test cookie |
| HTTP Concat | NGINX_HTTPCONCAT='y' | Concatenate CSS/JS files (Alibaba) |
| srcache | NGXDYNAMIC_SRCCACHE='y' | Transparent subrequest-based caching |
| memc-nginx | NGXDYNAMIC_MEMC='y' | Extended Memcached interface |
| redis2 | NGXDYNAMIC_REDISTWO='y' | Full Redis 2.0 protocol support |
| zstd | NGXDYNAMIC_ZSTD='y' | Zstandard compression |
| http_auth_request | NGINX_AUTHREQ='y' | Subrequest-based client authorization |
| nginx-length-hiding | NGINX_LENGTHHIDE='y' | BREACH attack mitigation |
| XSLT | NGINX_XSLT='y' | XML/XSLT response transformations |
| Perl | NGINX_PERL='y' | Embedded Perl scripting |
| FLV | NGINX_FLV='y' | Flash Video pseudo-streaming |
| MP4 | NGINX_MP4='y' | MP4 pseudo-streaming with seek |
| Slice | NGINX_SLICE='y' | Split large responses for caching |
| Passenger | NGINX_PASSENGER='y' | Phusion Passenger app server |
OpenResty Lua Module
Centmin Mod includes the OpenResty Lua Nginx module as a dynamic module (NGINX_OPENRESTY='y'). This embeds LuaJIT into Nginx for high-performance scripting directly in your Nginx configuration.
Companion OpenResty modules included:
- set-misc-nginx-module — Extended set directives (base64, hashing, random)
- echo-nginx-module — Shell-style echo, sleep, time in configs
- ngx_devel_kit — Development kit for third-party modules
Dynamic modules are loaded in /usr/local/nginx/conf/dynamic-modules.conf and can be individually enabled or disabled.
Brotli Compression
Brotli compression is compiled as a dynamic module (NGXDYNAMIC_BROTLI='y') and provides 15-25% better compression than gzip for text-based content. It supports both on-the-fly compression and serving pre-compressed .br files.
HTTP Concat Module
The nginx-http-concat module (by Alibaba) concatenates multiple CSS or JavaScript files into a single response, reducing HTTP requests. It is disabled by default.
Enable it with NGINX_HTTPCONCAT='y' in /etc/centminmod/custom_config.inc and run Menu 4 to recompile.
Usage Example
Request multiple files in one URL:
https://example.com/??style1.css,style2.css,style3.css
Nginx Upgrade / Downgrade (Menu 4)
Use centmin.sh menu option 4 to upgrade or downgrade Nginx to any version. This recompiles Nginx from source with all your configured modules.
# Set desired version in custom_config.inc first
NGINX_VERSION='1.29.6'
# Then run centmin.sh and select option 4
centmin.sh
--------------------------------------------------------
Centmin Mod Menu 141.00beta01 centminmod.com
--------------------------------------------------------
1). Centmin Install
2). Add Nginx vhost domain
3). NSD setup domain name DNS
4). Nginx Upgrade / Downgrade
5). PHP Upgrade / Downgrade
6). MySQL User Database Management
7). Persistent Config File Management
8). PostgreSQL Server Management
9). Option Being Revised (TBA)
10). Memcached Server Re-install
11). MariaDB MySQL Upgrade & Management
12). Zend OpCache Install/Re-install
13). Install/Reinstall Redis PHP Extension
14). SELinux disable
15). Install/Reinstall ImagicK PHP Extension
16). Change SSHD Port Number
17). Multi-thread compression: zstd,pigz,pbzip2,lbzip2
18). Suhosin PHP Extension install
19). Install FFMPEG and FFMPEG PHP Extension
20). NSD Install/Re-Install
21). Data Transfer
22). Add Wordpress Nginx vhost + Cache Plugin
23). Update Centmin Mod Code Base
24). Exit
--------------------------------------------------------
Enter option [ 1 - 24 ] 4
--------------------------------------------------------
**********************************************************************
* Nginx Update script - Included in Centmin Extras
* Version: 141.00beta01.b161 - Date: 16/08/25 - Copyright 2011-2025 CentminMod.com
**********************************************************************
This software comes with no warranty of any kind. You are free to use
it for both personal and commercial use as licensed under the GPL.
Nginx Upgrade - Would you like to continue? [y/n] y
Current Nginx Version: 1.29.6 (100326-200708-almalinux10-virtualbox-kvm-673b155)
Install which version of Nginx? (version i.e. type 1.29.6): 1.29.6
Do you still want to continue? [y/n] y
Editing Configs the Right Way
Always set configuration variables in /etc/centminmod/custom_config.inc (shortcut: customconfig) rather than editing centmin.sh directly. This persists your settings across Centmin Mod updates.
Auto-Backup on Upgrade
Before each Nginx upgrade, Centmin Mod automatically backs up your Nginx directory to /usr/local/nginxbackup. This allows you to restore your previous Nginx installation if needed.
Persistent Config File Management (Menu 7)
Menu option 7 manages persistent configuration files. Additionally, the Nginx VTS (Virtual Host Traffic Status) module can be optionally enabled to provide real-time traffic statistics per virtual host including request counts, response times, and bandwidth usage.
Enable VTS with NGINX_VHOSTSTATS='y' and recompile via Menu 4.
Access & Error Logs
Nginx log files are located at:
/var/log/nginx/access.log— Main access log/var/log/nginx/error.log— Main error log/home/nginx/domains/domain.com/log/access.log— Per-vhost access log/home/nginx/domains/domain.com/log/error.log— Per-vhost error log
Log rotation is handled automatically via logrotate with daily rotation and 10 days of retention.
Configuration Error Checking
Always test your Nginx configuration before reloading:
# Test configuration syntax
nginx -t
# Reload after successful test
ngxreload
# Or restart
ngxrestart
Adding/Enabling Modules
To enable or disable Nginx modules:
- Edit
/etc/centminmod/custom_config.inc - Set the module variable to
'y'(enable) or'n'(disable) - Run centmin.sh menu option 4 to recompile Nginx
# Example: Enable ModSecurity WAF and HTTP/3 QUIC
NGINX_MODSECURITY='y'
NGINX_QUIC_SUPPORT='y'
# Example: Enable GeoIP2 Lite
NGINX_GEOIPTWOLITE='y'
Key Configuration Files
| Path | Description |
|---|---|
| /usr/local/nginx/conf/nginx.conf | Main Nginx configuration |
| /usr/local/nginx/conf/conf.d/ | Virtual host configuration files |
| /usr/local/nginx/conf/dynamic-modules.conf | Dynamic module loading directives |
| /usr/local/nginx/conf/phpfpmd/ | PHP-FPM upstream configurations |
| /etc/centminmod/custom_config.inc | Persistent custom settings (survives updates) |
| /usr/local/nginx/modules/ | Dynamic module .so files |
Need help?
Join the community forums for Nginx configuration help and optimization tips.