nginx

Server Blocks

server {

  listen 80;
  listen [::]:80;
  server_name sub.domain.com;
  root /var/www/vhosts/sub.domain.com/htdocs;
  index index.html index.htm index.php;
 
}

Directory Indexes

Add autoindex for sitewide:

autoindex on;

Add autoindex for specific directories:

location /somedir { autoindex on; }