An open API service indexing awesome lists of open source software.

https://github.com/infernovm/nginx-installer

Automate NGINX compilation from source with custom modules, patches & optimizations for Debian & Ubuntu. Easily install, configure & upgrade NGINX with support for Brotli, HTTP/3, TLS 1.3, ModSecurity, and more. Boost performance, security & flexibility!
https://github.com/infernovm/nginx-installer

bot brotli cache cloudflare firewall geolocation http http2 https lua modsecurity nginx pagespeed proxy redis rtmp tengine waf

Last synced: 7 months ago
JSON representation

Automate NGINX compilation from source with custom modules, patches & optimizations for Debian & Ubuntu. Easily install, configure & upgrade NGINX with support for Brotli, HTTP/3, TLS 1.3, ModSecurity, and more. Boost performance, security & flexibility!

Awesome Lists containing this project

README

          

# 🚀 NGINX Auto Install Script – Fast and Optimized NGINX Installation



InfernoVM

Easily compile and install NGINX with custom features, modules, and patches – all from a single script!

---

## ✅ Supported Operating Systems

- **Debian** 9+
- **Ubuntu** 16.04+

## 🔥 Key Benefits

✔ **Latest Version** – Install the mainline or stable version of NGINX directly from the source.
✔ **Full Control** – Add custom modules and patches as needed.
✔ **Optimized Configuration File** – Use [custom nginx.conf](https://github.com/InfernoVM/Nginx-Installer/blob/master/conf/nginx.conf) for maximum performance.
✔ **Automatic Integration with systemd** – Includes a [systemd init script](https://github.com/InfernoVM/Nginx-Installer/blob/master/conf/nginx.service).
✔ **Efficient Log Management** – Configure [logrotate](https://github.com/InfernoVM/Nginx-Installer/blob/master/conf/nginx-logrotate) for optimized log handling.
✔ **Prevents APT Installation Conflicts** – Avoids issues with official package repositories.

---

## 🔧 Additional Modules and Optimizations

💡 **SSL and HTTP/3:**
- **LibreSSL / OpenSSL from Source** – Enables HTTP/2, TLS 1.3, and CHACHA20 encryption.
- **Cloudflare Patch** – Adds support for HTTP/3, TLS Dynamic Record Resizing, and HPACK.

🚀 **Performance and Compression:**
- **[ngx_pagespeed](https://github.com/pagespeed/ngx_pagespeed)** – Automatic page load optimization.
- **[ngx_brotli](https://github.com/google/ngx_brotli)** – Efficient Brotli compression for faster loading.

🛡 **Security and Protection:**
- **[ModSecurity](https://github.com/SpiderLabs/ModSecurity)** – Web Application Firewall for enhanced security.
- **[testcookie-nginx-module](https://github.com/kyprizel/testcookie-nginx-module)** – Advanced bot protection.
- **[nginx-ultimate-bad-bot-blocker](https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker)** – Automatic blocking of malicious traffic.

⚡ **Caching and Resource Optimization:**
- **[redis2-nginx-module](https://github.com/openresty/redis2-nginx-module)** and **[ngx_http_redis](https://www.nginx.com/resources/wiki/modules/redis/)** – Advanced Redis caching for improved performance.

🎥 **Streaming and Advanced Features:**
- **[lua-nginx-module](https://github.com/openresty/lua-nginx-module)** – Custom scripting inside NGINX.
- **[nginx-rtmp-module](https://github.com/arut/nginx-rtmp-module)** – RTMP support for live streaming.

---

## 📥 Installation and Usage

1️⃣ Download and run the script:

```sh
wget https://raw.githubusercontent.com/InfernoVM/Nginx-Installer/main/setup.sh
chmod +x setup.sh
./setup.sh
```

2️⃣ Check available [configuration examples](https://github.com/InfernoVM/Nginx-Installer/tree/master/conf) for specific modules.

3️⃣ **Headless Mode** – Automatic installation without user interaction:

```sh
HEADLESS=y ./setup.sh
```

**Usage Examples:**

✔ **Install NGINX with Brotli compression:**
```sh
HEADLESS=y NGINX_VER=MAINLINE BROTLI=y ./setup.sh
```

✔ **Install with GeoIP support:**
```sh
HEADLESS=y GEOIP=y GEOIP2_ACCOUNT_ID=YOUR_ID GEOIP2_LICENSE_KEY=YOUR_KEY ./setup.sh
```

✔ **Complete uninstallation and system cleanup:**
```sh
HEADLESS=y OPTION=2 RM_CONF=y RM_LOGS=y ./setup.sh
```

---

📌 **Why Use This Script?**
🔹 Full flexibility – Choose the modules and optimizations you need.
🔹 Fast and easy installation – No unnecessary manual setup.
🔹 Maximum performance – Tailored for high-speed and secure NGINX servers.

➡️ **Download the script now and optimize your server!**