Nginx Config Generator
Generate Nginx server block and Apache .htaccess configs from presets. All processing happens locally in your browser.
Configuration
Choose a preset and customize the settings
Proxy requests to an upstream app server
Generated Config
Copy or download as nginx.conf
# Nginx Reverse Proxy Configuration# Generated by Tinker - Nginx Config Generator# Server: example.comupstream app_server {server 127.0.0.1:3000;keepalive 32;}server {listen 80;listen [::]:80;server_name example.com www.example.com;# Gzip compressiongzip on;gzip_vary on;gzip_proxied any;gzip_comp_level 6;gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml;# Security headersadd_header X-Frame-Options "SAMEORIGIN" always;add_header X-Content-Type-Options "nosniff" always;add_header X-XSS-Protection "1; mode=block" always;# Proxy settingslocation / {proxy_pass http://127.0.0.1:3000;proxy_http_version 1.1;proxy_set_header Upgrade $http_upgrade;proxy_set_header Connection 'upgrade';proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header X-Forwarded-Proto $scheme;proxy_cache_bypass $http_upgrade;proxy_read_timeout 86400;}# Cache static assetslocation ~* \.(jpg|jpeg|png|gif|ico|css|js|woff|woff2|ttf|svg)$ {expires 1y;add_header Cache-Control "public, immutable";access_log off;}# Deny access to hidden fileslocation ~ /\. {deny all;access_log off;log_not_found off;}}