Nginx Config Generator Tool
CodeSwordsman Nginx Visual Config Generator is a powerful online visual tool supporting dual modes: global config (nginx.conf) and site config (vhost.conf). Compatible with Nginx 1.15/1.24/1.28/1.30/1.31 multiple versions. Provides complete configuration options including worker processes, events, HTTP, Gzip compression, SSL certificates, security headers. Supports advanced features like reverse proxy, load balancing, static caching, PHP-FPM, SPA deployment, WebSocket, hotlink protection, CORS. Real-time code preview, auto-save history, one-click copy and download, completely free with no installation required.
Nginx Config Visual Editor
Server Hardware Configuration
Basic Global
Set worker process count, recommend auto
Set max file descriptor limit
Set Nginx running user
Events Block
Set max connections per worker
Enable epoll event model (Linux recommended)
Enable accepting multiple connections at once
HTTP Global
Enable sendfile zero-copy transfer
Enable TCP_NOPUSH to optimize packets
Disable Nagle algorithm to reduce latency
Set keep-alive connection timeout (seconds)
Set max client request body size
Hide Nginx version information
Gzip Compression
Enable Gzip compression feature
Set compression level (1-9)
Set MIME types to compress
Log Settings
Set access log file path
Set error log file path
SSL/TLS Session Configuration
Set SSL session cache type and size, e.g., shared:SSL:10m
Time clients can reuse session parameters
Enable SSL session tickets for session resumption
Security Headers Configuration
Prevent clickjacking attacks, recommended values: DENY or SAMEORIGIN
Prevent MIME type sniffing attacks
Enable browser XSS filter
Control referrer header information sending policy
Content security policy to prevent XSS and data injection attacks
Control browser feature permissions
About This Tool
Nginx Config Generator builds nginx.conf from a visual form, combining performance tuning with virtual host settings. Enter CPU cores and memory, apply hardware-based recommendations, then enable SSL, reverse proxy, PHP-FPM, SPA routing, WebSocket, CORS and security options as needed.
It removes the need to remember directive names and safe defaults when setting up a new server or reviewing an inherited configuration. Everything is generated in the browser, so server paths and domain names stay private.
Key Features
Hardware Optimization
Recommend worker processes, connection limits and buffer settings from CPU and RAM values.
Performance Directives
Configure sendfile, tcp_nopush, keepalive, Gzip and static caching with guidance.
HTTPS and SSL
Enable TLS, set certificate paths and switch the listening port automatically.
Application Hosting
Add reverse proxy, PHP-FPM, SPA history mode and WebSocket upgrade support.
Security Options
Hide version information, block sensitive files, restrict hotlinking and configure CORS.
When to Use It
New Server Setup
Create a sane starting configuration for a fresh VPS instead of copying an outdated snippet.
Reverse Proxy Setup
Front a Node.js or Python application with nginx, including TLS and WebSocket support.
Configuration Review
Compare an existing configuration with recommended performance and security settings.
How to Use It
- 1Enter the server CPU cores and RAM, then apply the hardware optimization.
- 2Set the listening port, server name, site root and index files.
- 3Enable the features you need, such as SSL, reverse proxy, PHP-FPM or SPA mode.
- 4Generate the configuration, review it, and deploy it to your server.
Frequently Asked Questions
Should worker_processes be set to auto?
For most deployments auto is appropriate because it matches the number of available CPU cores. Dedicated tuning may help in unusual workloads.
Where do I get an SSL certificate?
Let's Encrypt and other certificate authorities provide free certificates. Update the certificate and key paths in the generated configuration.
Does the generated file replace my whole configuration?
It is a complete starting point. If you already have a configuration, merge the relevant server and http blocks carefully.
Is my server information uploaded?
No. Configuration is generated entirely in the browser.
