Nginxplore is a terminal-based tool that helps you quickly visualize, analyze, and audit NGINX configurations on your system. It automatically discovers NGINX configs, parses server blocks, and provides an interactive interface to explore your web server setup.
Perfect for DevOps engineers, system administrators, and anyone managing multiple NGINX configurations.
Automatically finds NGINX configurations in common locations:
/etc/nginx//usr/local/etc/nginx//opt/homebrew/etc/nginx/(macOS Homebrew)
Parses NGINX server blocks and extracts:
- Server names and aliases
- Listen ports and addresses
- SSL/TLS configuration
- Location blocks with proxy settings
- Root directories and file paths
Identifies and analyzes SSL/TLS configurations:
- Let's Encrypt Detection - Automatically identifies LE certificates
- Certificate Expiration - Shows expiry dates and warns about expiring certs
- Certificate Details - Displays issuer, subject, and validity period
- Color-Coded Status - Visual indicators for certificate health
- List View - Overview of all configurations at a glance
- Detail View - Deep dive into individual server blocks with full config preview
- Statistics Dashboard - Aggregated metrics and insights about your NGINX infrastructure
- Scrollable Views - Navigate through long configurations with ease
- Color-Coded Indicators - Quick visual status of TLS/SSL
- Vim-Style Navigation - Familiar keyboard shortcuts (j/k)
- Mosh Compatible - Works reliably over Mosh connections
ββ NGINX Configurations ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β example.com 80, [::]:80 No TLS ...conf β
β example.com 443 ssl http2 TLS Enabled [LE] ...conf β
β api.example.com 8080 No TLS ...conf β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Clone the repository
git clone https://github.com/davidliedle/Nginxplore.git
cd Nginxplore
# Build release binary
cargo build --release
# Install system-wide (optional)
sudo cp target/release/nginxplore /usr/local/bin/- Rust 1.70 or later
- NGINX installed on your system (for live configs)
- Read access to NGINX configuration files (may require sudo)
Auto-discover and display NGINX configurations:
nginxploreSpecify a custom directory to scan:
# Scan a specific directory
nginxplore --config-dir /path/to/configs
# Test with included examples
nginxplore --config-dir ./test_configs| Option | Description |
|---|---|
-c, --config-dir <DIR> |
Custom directory to search for NGINX configs |
-h, --help |
Show help information |
-V, --version |
Show version |
| Key | Action |
|---|---|
β / β or j / k |
Navigate through configurations (list view) or scroll (detail view) |
Enter |
Toggle detailed view for selected server |
s |
Show statistics dashboard |
q |
Quit application |
| Color | Icon | Meaning |
|---|---|---|
| π’ Green | TLS Enabled | Certificate valid and active |
| π‘ Yellow | Expiring Soon | Certificate expires within 30 days |
| π΄ Red | EXPIRED | Certificate has expired |
| βͺ Gray | No TLS | SSL/TLS not configured |
[LE] |
- | Let's Encrypt certificate detected |
Press s to view the statistics dashboard, which provides:
- Total Servers - Count of all server blocks found
- Server Naming - Breakdown of servers with/without server_name directive
- TLS Configuration - How many servers have TLS enabled/disabled
- Let's Encrypt Usage - Count of Let's Encrypt certificates
- Certificate Status - Warnings for expired or expiring certificates
- Port Distribution - Top 10 most common ports in use
Perfect for getting a quick overview of your entire NGINX infrastructure!
# May require sudo for read access
sudo nginxplore# Point to a directory of configs
nginxplore --config-dir /etc/nginx/sites-enabled# Use the non-interactive test binary
./target/release/test_parse /path/to/configsnginxplore/
βββ src/
β βββ main.rs # Entry point and CLI handling
β βββ lib.rs # Library interface
β βββ nginx/ # Config discovery and parsing
β β βββ mod.rs # Discovery logic
β β βββ parser.rs # NGINX config parser
β βββ tls.rs # Certificate analysis
β βββ ui.rs # Terminal UI components
β βββ bin/
β βββ test_parse.rs # Non-interactive test tool
βββ test_configs/ # Example NGINX configurations
βββ Cargo.toml # Dependencies and metadata
The project is organized into three main modules:
-
nginx/- Configuration discovery and parsing- Finds config files in standard locations
- Parses server blocks, directives, and includes
- Extracts server names, ports, and locations
-
tls/- Certificate analysis and validation- Detects Let's Encrypt certificates
- Parses X.509 certificate data
- Calculates expiration dates and validity
-
ui/- Terminal user interface- List view with status indicators
- Detailed configuration view
- Event handling and navigation
Built with high-quality Rust crates:
- ratatui - Terminal UI framework
- crossterm - Cross-platform terminal manipulation
- clap - Command-line argument parsing
- x509-parser - X.509 certificate parsing
- chrono - Date and time handling
- regex - Configuration parsing
- anyhow - Error handling
# Build and run tests
cargo test
# Build release binary
cargo build --release
# Run with test configs
cargo run --release -- --config-dir test_configsThe codebase is modular and easy to extend:
- Parser enhancements - Add support for more NGINX directives in
src/nginx/parser.rs - UI improvements - Modify the display logic in
src/ui.rs - Certificate checks - Extend TLS validation in
src/tls.rs
Error: No NGINX configurations foundSolution: Specify a custom directory or check NGINX installation:
nginxplore --config-dir /path/to/configsError: Permission denied (os error 13)Solution: Run with sudo to access system configs:
sudo nginxploreNginxplore attempts to parse SSL certificates but may fail if:
- Certificate files don't exist at specified paths
- Permissions prevent reading certificate files
- Certificate format is unsupported
The tool will still display configuration info even if cert parsing fails.
Contributions are welcome! Please feel free to submit a Pull Request.
- Search/filter functionality to quickly find servers by name
- Sort options (by name, TLS expiration, port)
- Export functionality (JSON, YAML output)
- Support for more NGINX directives (upstream blocks, rate limiting, etc.)
- Real-time config validation
- Integration with certbot for certificate renewal
- Syntax highlighting in detail view
MIT License - see LICENSE file for details.
David Liedle
- Built with ratatui - awesome Rust TUI framework
- Inspired by the need for better NGINX configuration management tools
- Thanks to the Rust community for excellent libraries and documentation
Made with β€οΈ and Rust