πŸ› οΈToolsShed

Nginx Config Generator

Generate Nginx server block configurations for static sites, reverse proxies, and SSL.

gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml;

server {
    listen 80;
    server_name example.com www.example.com;

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

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

    location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf)$ {
        expires 1y;
        add_header Cache-Control "public, immutable";
    }
}

Frequently Asked Questions

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.