TOOL / SCRIPT
NGX: Nginx Setup Script
stableStable: This tool is production-ready, well-tested, and actively maintained. It's been battle-tested across multiple projects and is ready for serious use. Found a bug or have suggestions? Open an issue on GitHub.
Automated Nginx configuration for local static sites with SSL, SPA routing, API proxying, and custom domains. Perfect for modern web development workflows.
time Saved
85%
sites
15+
setup
< 1 min
What It Does
NGX is an automated Nginx setup script that configures local development environments with a single command. It handles Nginx configuration, SSL certificate generation, hosts file management, SPA routing, and API proxying. What used to take 30 minutes of manual configuration now takes 30 seconds.
The Problem
Setting up local development sites meant manually editing Nginx configs, generating SSL certificates, and updating hosts files for every project. Each setup took 30+ minutes, and debugging configuration errors was frustrating. As a QA engineer testing multiple frontend applications, this repetitive process was killing my productivity.
The Solution
To avoid doing the setup by hand each time, I wrote a script to handle it for me. It originally took two arguments: the URL and the location of the dist folder, and I called it NGX. Later, I added more features to it at home. Now it handles the entire process on its own. One command creates the Nginx config, generates SSL certificates, updates the hosts file, and sets up SPA routing and API proxying. I can spin up a fresh test environment in seconds and focus on testing instead of setup.
Key Features
Automatic SSL certificate generation for HTTPS development
SPA routing support for React, Vue, Angular applications
API proxy configuration for full-stack development
Custom TLD support (.dev, .local, .io, etc.)
Site management (list, create, remove)
Dry-run mode for safe previewing
Comprehensive validation and error handling
Automatic rollback on failures
Usage Examples
Basic Setup
Get a local site running in seconds
# Simple static site
./ngx.sh create myapp ./dist
# With SSL
./ngx.sh create myapp ./dist --sslFull-Stack Development
Complete development environment with one command
# SPA with SSL and API proxy
./ngx.sh create myapp ./dist \
--ssl \
--spa \
--api http://localhost:3001 \
--tld .devSite Management
Easy site management and safe operations
# List all sites
./ngx.sh list
# Remove a site
./ngx.sh remove myapp
# Preview changes
./ngx.sh create myapp ./dist --ssl --dry-runLicense - MIT
© 2025 Shamlo Ameer
This tool is open source and free to use. You're welcome to use, modify, and distribute it for any purpose, including commercial projects. Attribution is appreciated but not required.
✓ You can:
- •Use for personal or commercial projects
- •Modify and adapt to your needs
- •Distribute and share freely
- •Include in your own projects
ℹ️ Please note:
- •Provided "as is" without warranty
- •Attribution appreciated but optional
- •No liability for any damages
Questions or feedback? zothstic@gmail.com