nginxconf-wizard
v0.1.4
Published
Intelligent CLI tool for generating production-ready Nginx configurations
Maintainers
Readme
nginxconf-wizard
Intelligent Nginx Configuration Generator
Generate production-ready Nginx configurations with (Upcoming) AI-powered performance profiles and framework presets
Features
Smart Configuration
- AI-Powered Profiles: Automatically detect and apply optimal performance settings
- Framework Presets: Ready-to-use configs for Next.js, React, WordPress, Laravel, etc.
- Configuration Validation: Comprehensive syntax checking and best practice recommendations
- Nginx Testing: Built-in
nginx -twrapper with enhanced error reporting
Security & Performance
- Security Hardening: SSL/TLS, security headers, and rate limiting by default
- Performance Optimization: Tuned profiles for high-traffic, CDN, API gateway environments
- Log Analysis: Access and error log parsing with actionable insights
- Benchmark Analysis: Performance analysis for wrk, ApacheBench, k6, and other tools
Installation
Global Installation (Recommended)
npm install -g nginxconf-wizardLocal Development
git clone https://github.com/trfhgx/nginxconf-wizard.git
cd nginxconf-wizard
npm install
npm linkVerify Installation
nginxconf-wizard --versionQuick Start
Interactive Wizard
nginxconf-wizardFollow the prompts to generate your first configuration!
Framework Presets
# Next.js Application
nginxconf-wizard generate --preset nextjs --profile api-gateway
# React SPA with API
nginxconf-wizard generate --preset react-spa
# WordPress Site
nginxconf-wizard generate --preset wordpress --profile high-trafficValidate Configuration
nginxconf-wizard validate nginx.confUsage
Generate Configuration
nginxconf-wizard generate [options]| Option | Description | Example |
|--------|-------------|---------|
| --preset <name> | Framework preset | --preset nextjs |
| --profile <name> | Performance profile | --profile high-traffic |
| --output <file> | Output file | --output my-nginx.conf |
Available Presets
nextjs- Next.js applicationsreact-spa- React Single Page Appswordpress- WordPress siteslaravel- Laravel applicationsstatic-html- Static websitesfastapi- FastAPI backends
Performance Profiles
balanced- Default settingshigh-traffic- 2048+ connectionslow-resource- Constrained environmentscdn-origin- Behind Cloudflareapi-gateway- High upstream connections
Advanced Commands
# Update existing configuration
nginxconf-wizard update --auto-apply
# Analyze logs for insights
nginxconf-wizard analyze-logs /var/log/nginx/access.log
# Benchmark analysis
nginxconf-wizard analyze-benchmark results.txt --apply
# Test configuration
nginxconf-wizard test nginx.confContributing
We welcome contributions! Please see our Contributing Guide.
Development Workflow
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'feat: add amazing feature' - Push:
git push origin feature/amazing-feature - Open Pull Request
Code Quality
- ESLint configuration
- Jest test coverage
- Prettier formatting
- Conventional commits
Requirements
- Node.js: 18.0.0 or higher
- Nginx: 1.18.0 or higher (optional, for testing)
Getting Help
- Documentation
- Issue Tracker ALso checkout
- Troubleshoot
- Roadmap
License
This project is licensed under the MIT License - see the LICENSE file.
Made with love for the Nginx community
