- Notifications
You must be signed in to change notification settings - Fork1
Automate NGINX Compilation from Source with Custom Modules and Patches on Debian & Ubuntu
NotificationsYou must be signed in to change notification settings
AnonVM/Nginx-Installer
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Easily compile and install NGINX from source with custom features, modules, and patches.
- Debian 9 and later
- Ubuntu 16.04 and later
- Compile the latest mainline or stable NGINX from source.
- Integrate optional modules and patches.
- Use acustom nginx.conf for enhanced performance.
- Include asystemd init script (not provided by default).
- Configurelogrotate for efficient log management.
- Block APT-based NGINX installations to avoid conflicts.
- LibreSSL or OpenSSL from Source: Enable cutting-edge TLS features like HTTP/2, CHACHA20, and TLS 1.3.
- Cloudflare Patches: Add HTTP/3, TLS Dynamic Record Resizing, and HPACK encoding.
- Performance Modules: Integratengx_pagespeed for optimization andngx_brotli for Brotli compression.
- Security Enhancements: UseModSecurity for WAF,testcookie-nginx-module for bot protection, andnginx-ultimate-bad-bot-blocker for blocking malicious traffic.
- Cache Modules: Incorporate Redis-based caching withredis2-nginx-module andngx_http_redis.
- Additional Modules: Extend functionality withlua-nginx-module,RTMP module for streaming, and more.
Download and execute the script to:
- Install or update NGINX
- Uninstall with optional cleanup
- Self-update the script
wget https://raw.githubusercontent.com/AnonVM/Nginx-Installer/main/setup.shchmod +x setup.sh./setup.sh
Check outconfiguration examples for custom modules.
For automated installations, run the script in headless mode by settingHEADLESS=y
.
HEADLESS=y ./setup.sh
Example commands:
- Install NGINX with Brotli:
HEADLESS=y NGINX_VER=MAINLINE BROTLI=y ./setup.sh
- Install with GeoIP:
HEADLESS=y GEOIP=y GEOIP2_ACCOUNT_ID=YOUR_ACCOUNT_ID_HERE GEOIP2_LICENSE_KEY=YOUR_LICENSE_KEY_HERE ./setup.sh
- Uninstall with Cleanup:
HEADLESS=y OPTION=2 RM_CONF=y RM_LOGS=y ./setup.sh