server {
listen 80;
server_name localhost;
location = /favicon.ico {
log_not_found off;
log_subrequest off;
}
location ^~ /log {
alias /home/dist;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
}
}
参考:
http://nginxlibrary.com/enable-directory-listing/