NGINX Config Generator

High-performance, secure Nginx routing logic for Single Page Apps (SPA) and Node.js/Python microservices.

Server Optimizations

/etc/nginx/conf.d/example.com.conf
server {
    listen 80;
    listen [::]:80;
    server_name example.com www.example.com;

    client_max_body_size 50M;

    root /var/www/example.com/html;
    index index.html index.htm;

    gzip on;
    gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
    gzip_proxied any;

    location / {
        try_files $uri $uri/ /index.html;
    }

    location ~ /\.ht {
        deny all;
    }
}