server {
    listen 80;
    server_name _;
    root /usr/share/nginx/html;
    index index.html;
    charset utf-8;

    # Lista as pastas automaticamente
    location / {
        try_files $uri $uri/ =404;
        autoindex on;
        autoindex_exact_size off;
        autoindex_localtime on;
    }

    # Cache de assets
    location ~* \.(jpg|jpeg|png|gif|ico|svg|woff2)$ {
        expires 7d;
        add_header Cache-Control "public";
    }

    gzip on;
    gzip_types text/html text/css application/javascript image/svg+xml;
}
