Nginx Config Generator
Genera configurazioni nginx.conf pronte per la produzione per Reverse Proxy, SSL/HTTPS, Load Balancer, file statici e Single Page App. Include rate limiting, caching, gzip e security header. Nessuna installazione richiesta.
Configuration Type
Server Settings
Use _ for catch-all. Separate multiple names with spaces.
Default: 80 for HTTP, 443 for HTTPS.
Upstream Servers
Proxy Headers
nginx.conf31 lines
# Generated by Nginx Config Generator — federicocalo.dev
# 2026-06-04T08:12:32.534Z
upstream backend {
server 127.0.0.1:8080;
}
server {
listen 80;
server_name example.com;
# Gzip compression
gzip on;
gzip_min_length 1024;
gzip_types text/plain text/css application/json application/javascript text/html;
gzip_vary on;
gzip_comp_level 6;
# Security headers
add_header X-Frame-Options "DENY" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Content-Security-Policy "default-src 'self'" always;
location / {
proxy_pass http://backend;
proxy_http_version 1.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
}
}Quick Reference
- Location matching
= /uri— exact |~* \.ext$— regex |/prefix— prefix- Proxy buffering
proxy_buffering on+proxy_buffer_size- WebSocket
- Add
Upgrade+Connectionproxy headers - Let's Encrypt
- Use certbot:
certbot --nginx -d example.com - Test config
nginx -tthennginx -s reload- Log format
access_log /var/log/nginx/access.log combined;