If you're simply trying to list directory contents use autoindex on;
like:
location /somedir {
autoindex on;
}
server {
listen 80;
server_name domain.com www.domain.com;
access_log /var/...........................;
root /path/to/root;
location / {
index index.php index.html index.htm;
}
location /somedir {
autoindex on;
}
}