Nginx Config Generator — Performance-Optimized Server Configuration
Generate nginx server block configurations for static sites, reverse proxies, and PHP-FPM setups. Includes SSL best practices, gzip compression, security headers, and upstream blocks — updated in real time as you change options.
How to Use Nginx Config Generator — Performance-Optimized Server Configuration
How to Use the Nginx Config Generator
Step 1: Choose a Site Type
Select one of three site types at the top:
- Static Files — serves HTML, CSS, and JavaScript from a directory on disk (e.g. a React build output or a static site generator output)
- Reverse Proxy — proxies all requests to an upstream application server (Node.js, Python, Go, etc.)
- PHP-FPM — routes PHP files through FastCGI (suitable for WordPress, Laravel, and other PHP apps)
Step 2: Enter Your Domain and Paths
Fill in the domain name (e.g. example.com) and the relevant path or address for your site type:
- Static / PHP: document root directory on disk, e.g.
/var/www/mysite - Proxy: upstream address as
host:port, e.g.127.0.0.1:3000 - PHP: PHP-FPM socket path, e.g.
unix:/var/run/php/php8.2-fpm.sock
Step 3: Enable Options
Toggle the options that apply to your setup:
- SSL / HTTPS — adds an HTTP → HTTPS redirect block and TLS directives using Let's Encrypt certificate paths (run
certbot --nginxafter deploying) - Include www — adds
www.yourdomain.comtoserver_namein all blocks - Gzip compression — enables gzip with sensible defaults for web content types
- Security headers — adds X-Frame-Options, X-Content-Type-Options, Referrer-Policy, and (when SSL is on) HSTS
Step 4: Copy and Deploy
Click Copy to copy the generated config to your clipboard. Save it to /etc/nginx/sites-available/yourdomain.conf, then:
sudo ln -s /etc/nginx/sites-available/yourdomain.conf /etc/nginx/sites-enabled/
sudo nginx -t # verify syntax
sudo systemctl reload nginx
Presets
Use the preset buttons to quickly load a common setup:
- Static Site + SSL — HTML/CSS/JS with HTTPS, gzip, and security headers
- Node.js Proxy + SSL — Express/Next.js app behind nginx with SSL
- PHP / WordPress — PHP-FPM with WordPress permalink support
Frequently Asked Questions
Most Viewed Tools
Screen Size Converter — Diagonal Dimension Tool
Calculate screen width and height from diagonal size and aspect ratio. Convert between inches and centimeters for displays, TVs, and monitors with instant dimension calculations.
Use Tool →DPI Calculator — Print Resolution Tool
Calculate DPI (dots per inch), image dimensions, and print sizes. Convert between pixels and physical dimensions for printing and displays.
Use Tool →TOTP Code Generator — 2FA Testing Tool
Generate time-based one-time passwords from a TOTP secret key. Enter your base32 secret, choose a period and digit length, and get the current and next codes with a live countdown timer. Useful for testing and debugging 2FA integrations.
Use Tool →Password Entropy Calculator — Crack Time Estimator
Calculate the information-theoretic bit entropy of any password or API key. Detects character set pools automatically, shows the total number of possible combinations, and estimates crack time across five attack scenarios from rate-limited web logins to GPU cracking clusters.
Use Tool →JSONL Formatter — Line-by-Line Validator
Format, validate, and inspect JSON Lines (JSONL) and NDJSON files. Validates each line individually, reports parse errors by line number, outputs compact JSONL or a pretty-print preview, and lets you download the cleaned file.
Use Tool →JSON to Zod — Schema Generator
Generate Zod validation schema code from a JSON sample object. Infers z.string(), z.number(), z.boolean(), z.array(), z.object(), and z.null() types automatically. Handles nested objects, arrays of objects with optional field detection, and outputs copy-ready TypeScript with import and z.infer type alias.
Use Tool →Seconds to Time Converter — HH:MM:SS Formatter
Convert seconds to HH:MM:SS time format instantly with precise calculations and easy-to-read formatting.
Use Tool →TLS Cipher Suite Checker — Strength Analyzer
Check TLS protocol version compatibility and cipher suite strength ratings against current best practices. Supports IANA and OpenSSL cipher names — rates each suite as Strong, Weak, or Deprecated and explains why.
Use Tool →Related DevOps & Infrastructure Tools
Robots.txt Generator — Crawler Control Tool
Generate robots.txt file to control search engine crawlers. Create user-agent rules, allow/disallow paths, set crawl delays, and add sitemap URLs. Perfect for managing bot access to your website.
Use Tool →GitHub Actions Validator — Workflow Syntax & CI/CD Security Audit
Validate GitHub Actions workflow YAML for syntax errors, missing required fields, deprecated commands, mutable action refs, outdated action versions, and broken job dependencies. Get per-job results with fix hints in real time.
Use Tool →AWS S3 CORS Generator — Build, Audit, and Export S3 CORS Policies
Configure allowed origins/methods/headers and generate the S3 bucket CORS JSON policy
Use Tool →HTTP Header Analyzer — Security & CORS Audit
Parse and analyze HTTP request or response headers. Identifies categories, explains each header, flags missing security headers, and detects duplicates or suspicious values — entirely in your browser.
Use Tool →robots.txt Validator — Crawl Rule Checker
Validate your robots.txt file against the Robots Exclusion Protocol. Checks directive syntax, path formats, Crawl-delay values, and Sitemap URLs. Previews crawl rules per user-agent group. Free and runs entirely in your browser.
Use Tool →Makefile Target Generator — Scaffold, Validate, and Self-Document Makefiles
Define make target names and commands and dependencies to generate a formatted Makefile with PHONY targets
Use Tool →Sitemap Validator — XML Sitemap Checker
Validate XML sitemaps against the sitemap protocol specification. Checks structure, required fields, URL count, changefreq values, and priority ranges. Supports both URL sitemaps and sitemap index files. Free and runs entirely in your browser.
Use Tool →Query String Parser — URL Parameter Decoder
Parse URL query strings into readable key-value pairs. Decode parameters and inspect URL search queries with ease.
Use Tool →Share Your Feedback
Help us improve this tool by sharing your experience