user nginx nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

events {
    worker_connections 1024;
}

http {
    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;

    server {
      listen 80;
      autoindex_localtime on;
      server_name {{ nginx_server_name }};

      access_log /var/log/nginx/packages-error.log;
      error_log /var/log/nginx/packages-error.log;

      root /var/packages;

      add_header Strict-Transport-Security "max-age=31536000" always;  
      add_header X-Frame-Options "SAMEORIGIN" always;  
      add_header X-XSS-Protection "1; mode=block" always; 

      location / {
        index index.html;
        autoindex on;
      }

      location ~ /(.*)/conf {
        deny all;
      }

      location ~ /(.*)/db {
        deny all;
      }
    }
}
