Engintron is a system that integrates Nginx as a reverse caching proxy in front of Apache on cPanel/WHM servers. This document explains what Engintron is, its core purpose, and the performance benefits it provides.
For detailed installation procedures, see page 2 (Installation & Setup). For configuration and customization options, see page 4 (Configuration & Customization). For cPanel/WHM-specific integration features, see page 5 (cPanel/WHM Integration).
Engintron deploys Nginx as a reverse caching proxy in front of Apache on cPanel/WHM servers. The system reconfigures the hosting environment so that Nginx listens on standard HTTP/HTTPS ports (80/443) while Apache is moved to backend ports (8080/8443). Nginx directly serves static assets (CSS, JS, images) and implements caching strategies for dynamic content, reducing load on Apache and backend services (PHP, MySQL).
The primary components are:
engintron.sh - Main installation and management scriptengintron.php - WHM plugin interface for web-based management/etc/nginx/ that define server blocks, proxy behavior, and caching ruleshttps_vhosts.php - Automated script that generates HTTPS virtual host configurationsSources: README.md1-66
System Architecture Overview
This diagram shows the system architecture using actual file paths and process names. The Nginx layer contains the configuration files that define server behavior, proxy rules, and cache zones. The management layer controls these components through scripts that read and write configuration files and manage service states.
Sources: README.md1-66
Engintron consists of several key components that provide reverse proxy functionality and performance optimization.
Configuration File Structure
The configuration system is organized hierarchically:
| Component | File Path | Purpose |
|---|---|---|
| Main Nginx config | /etc/nginx/nginx.conf | Worker processes, cache zones, global settings |
| Default HTTP server | /etc/nginx/conf.d/default.conf | Port 80 server block, includes common_http.conf |
| HTTPS virtual hosts | /etc/nginx/conf.d/default_https.conf | Port 443 server blocks, auto-generated |
| Common HTTP settings | /etc/nginx/common_http.conf | Shared HTTP configuration, includes custom_rules |
| Common HTTPS settings | /etc/nginx/common_https.conf | SSL/TLS settings, certificate paths |
| Custom rules | /etc/nginx/custom_rules | User customizations, CloudFlare integration |
| Base proxy parameters | /etc/nginx/proxy_params_common | Header forwarding, client IP detection |
| Dynamic proxy params | /etc/nginx/proxy_params_dynamic | 1-second micro-cache for HTML |
| Static proxy params | /etc/nginx/proxy_params_static | 10-second cache for static assets |
The engintron.sh script manages installation, configuration updates, and service control. The engintron.php WHM plugin provides a web interface for these operations. The https_vhosts.php script runs every 15 seconds to synchronize SSL virtual host configurations from Apache to Nginx.
Sources: README.md41-66
Engintron implements a two-tier caching system in Nginx for static and dynamic content:
| Cache Type | Purpose | Nginx TTL | Browser Cache-Control | Nginx Zone | Target Content |
|---|---|---|---|---|---|
| Static Cache | Static asset caching | 10 seconds | 30-60 days (max-age) | engintron_static | CSS, JS, Images, Fonts |
| Dynamic Cache | Micro-cache for HTML | 1 second | No browser caching | engintron_dynamic | Dynamic HTML responses |
| Cache Bypass | No caching | N/A | Varies by response | Direct proxy | Admin URLs, POST requests |
Cache zones are defined in /etc/nginx/nginx.conf as:
proxy_cache_path /var/cache/engintron/static for the engintron_static zone (4GB, 10min inactive)proxy_cache_path /var/cache/engintron/dynamic for the engintron_dynamic zone (4GB, 1min inactive)The caching behavior is controlled by:
/etc/nginx/proxy_params_static - applies engintron_static zone to static file types/etc/nginx/proxy_params_dynamic - applies engintron_dynamic zone with 1-second TTL/etc/nginx/custom_rules - defines cache bypass conditions for admin URLs and specific applicationsSources: README.md25-33
Request Processing Flow
This flow shows how requests traverse the actual configuration files. The default.conf or default_https.conf server blocks receive requests, include custom_rules for early routing decisions, then include either proxy_params_static or proxy_params_dynamic based on file type. These proxy parameter files define which cache zone to use (engintron_static or engintron_dynamic) and set TTL values. Cache hits bypass Apache entirely, while misses proxy to Apache on ports 8080/8443.
Sources: README.md25-33
Engintron provides performance improvements through several mechanisms:
Nginx serves static assets (CSS, JS, images, fonts, documents) directly from its own cache or filesystem without proxying to Apache. This eliminates Apache process overhead and PHP interpreter initialization for every static file request. The proxy_params_static configuration applies a 10-second Nginx cache with long browser cache directives (30-60 days via Cache-Control: max-age).
The engintron_dynamic cache zone implements a 1-second micro-cache for dynamic HTML responses. This cache:
custom_rules (admin URLs and user sessions bypass caching)Nginx's event-driven architecture handles thousands of concurrent connections with minimal resource usage compared to Apache's process-based model. Where Apache might spawn hundreds of processes consuming significant RAM, Nginx uses a small number of worker processes to serve the same traffic volume.
By offloading static content delivery and caching dynamic responses, Engintron reduces:
This frees server resources for additional websites or other services. The system maintains full cPanel compatibility while providing performance benefits similar to a CDN like CloudFlare, but operating directly on the server.
Sources: README.md24-38
Engintron integrates seamlessly with cPanel/WHM through multiple management interfaces:
engintron.sh script provides comprehensive command-line management for installation, updates, service control, and maintenance operationsengintron.php interface offers a web-based dashboard within WHM for configuration file editing, service management, and system monitoringhttps_vhosts.php script runs via cron every 15 seconds to automatically synchronize SSL certificate configurations between Apache and NginxThe system requires no ongoing maintenance after installation, operating as a "set and forget" solution that automatically adapts to new domains, SSL certificates, and configuration changes made through standard cPanel interfaces.
Sources: README.md58-63