Nginx
Web server and reverse proxy configuration. Manage sites, SSL certificates, load balancing, and traffic routing.
65 commands
Browse by Topic
Getting Started
Quick setup and installation
Control
Start/stop/reload
Config
Configuration
Logs
Log management
Reverse Proxy
Proxy & load balancing
SSL/TLS
HTTPS & certificates
Performance
Caching & optimization
Security
Headers & access control
Install Nginx (macOS)
Install Nginx using Homebrew on macOS
Install Nginx (Linux)
Install Nginx using APT on Debian/Ubuntu Linux
Check Nginx version
Verify Nginx is installed and display version
Enable on boot
Enable Nginx to start on system boot
Graceful stop
Gracefully stop Nginx (finish current requests)
Reload config
Reload configuration without stopping
Reopen log files
Reopen log files (for log rotation)
Restart (systemd)
Restart Nginx service
Start Nginx
Start Nginx server
Check status (systemd)
Check Nginx service status
Stop Nginx
Stop Nginx server immediately
Test configuration
Test configuration syntax
Test config (verbose)
Test config and dump full configuration
Show version
Show Nginx version
Show version and modules
Show version, compiler, and configure arguments
Check specific config
Test a specific configuration file
Show config path
Show path to main configuration file
Disable site
Disable a site configuration
Edit main config
Edit main Nginx configuration
Edit site config
Edit site-specific configuration
Enable site
Enable a site configuration
List enabled sites
List all enabled site configurations
List available sites
List all available site configurations
Find 404 errors
Show recent 404 errors
View access log
Follow access log in real-time
Truncate logs
Clear log files without deleting them
View error log
Follow error log in real-time
Show last 100 errors
Show last 100 lines of error log
Search in access log
Search for pattern in access log
Top requesting IPs
Show top 20 IPs by request count
Top requested URLs
Show top 20 requested URLs
IP hash session persistence
Same client IP always reaches same backend
Least connections balancing
Route to server with fewest active connections
Load balance round-robin
Distribute traffic across multiple backends
Weighted load balancing
Distribute traffic with custom weights
Health check with failover
Mark server down after 3 failures with backup
Disable proxy buffering
Disable buffering for SSE or streaming
Reverse proxy to port 3000
Forward requests to backend app
Pass real IP to backend
Forward client IP to backend service
Proxy timeouts
Set connection and read timeouts for backend
WebSocket proxy
Enable WebSocket connections through proxy
SSL certificate paths
Configure certificate and key file locations
Install Let's Encrypt certificate
Obtain free SSL with Certbot
Enable HSTS
Force browsers to always use HTTPS
Modern TLS protocols only
Disable outdated SSL versions
HTTP to HTTPS redirect
Redirect all HTTP to HTTPS
Renew certificates
Renew all Let's Encrypt certificates
Test certificate renewal
Test renewal process without renewing
SSL session cache
Cache SSL sessions for performance
Browser cache static assets
Cache static files for one year
Limit concurrent connections
Restrict concurrent connections per IP
Enable gzip compression
Compress text responses to reduce bandwidth
Keepalive upstream connections
Reuse connections to backend servers
Disable logging for static files
Reduce I/O by skipping static file logs
Apply rate limit to location
Apply rate limit with burst allowance
Rate limit per IP
Limit each IP to 10 requests per second
Worker process tuning
Auto-configure workers per CPU core
Enable basic authentication
Require password for protected areas
Block IP address
Block specific IP from accessing site
CORS headers for API
Enable cross-origin requests from specific domain
Security headers
Protect against clickjacking and MIME sniffing
Hide server version
Remove Nginx version from headers and error pages
Create htpasswd file
Create password file for basic auth
Limit upload size
Restrict maximum request body size
Whitelist IPs only
Restrict access to specific IP range
Discussion
Loading comments...