Directory Listings in nginx

November 28, 2010

To turn on directory listings in nginx, add

autoindex on;

after the server name:

server {
  listen 80 default;
  server_name host _;
  autoindex on;

  access_log /home/user/log/host.log;

  location / {
    root /home/user/web/host;
  }

Tags: nginx