title: Nginx Directory Listing only for subpath
body: <p>I am trying to make my subpath as directory listing only in Nginx, however it returns 404.</p>
  
  <p>Suppose I have following config for <code>http://file.example.com/test</code>:</p>
  
  <pre><code>server {
      listen        80;
      server_name  file.example.com;
  
      location /test/ {
          root    /var/www/abc/def/;
          autoindex on;
          autoindex_exact_size off;
          autoindex_format html;
          autoindex_localtime on;
      }
  }
  </code></pre>
  
  <p>I didn't specify <code>/</code> section, is it the issue caused above not working? Anything I missed?</p>