You should try HttpAutoindexModule.
Set autoindex option to on
. It is off by default.
Your example configuration should be ok
location /{
root /home/yozloy/html/;
index index.html;
autoindex on;
}
Without autoindex option you should be getting Error 403 for requests that end with /
on directories that do not have an index.html
file. With this option you should be getting a simple listing:
<html>
<head><title>Index of /</title></head>
<body bgcolor="white">
<h1>Index of /test/</h1><hr><pre><a href="../">../</a>
<a href="test.txt">test.txt</a> 19-May-2012 10:43 0
</pre><hr></body>
</html>
Edit: Updated the listing to delete any references to test