Disable listing for a directory without index on nginx

Directory listing disabled by default on the nginx.
Anyway, it if was enabled globally, to disable it we need to set the value of the autoindex to off - this applies globally (if no directory is specified) or to a location.
For example:

location / {
  autoindex off;
}