Dev Tools

Nginx Config Generator

Generate nginx server block configurations with SSL, gzip, and proxy/try_files location blocks.

Server Settings
Options
Location Blocks
Generated Configuration
# Gzip compression
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;

server {
    listen 80;
    server_name example.com;

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

    access_log /var/log/nginx/example.com.access.log;
    error_log /var/log/nginx/example.com.error.log;

    location / {
        try_files $uri $uri/ =404;
    }

}
Was this page helpful?

Related tools