Hello all I'm following a guide https://www.youtube.com/watch?v=7QXnk8emzOU and exactly did everything same and I've checked other similar problems such as nginx autoindex doesn't work and Issues with nginx autoindex .
Configuration file of nginx :
server {
listen 80; #says to listen on standard port
server_name _; #the default server
location / { #location is the root of the site
root /test/a/; #root is located at /test/a/
index index.htm; #index is for autocomplete
autoindex on; #this way files will be autoindexed
}
}
The html files are located at /test/a
, one is /test/a/index.htm
, other is /test/a/outdex.htm
. I see the content of index.htm when I connect to IP of server.
I have recursively changed permissions of all the content for avoiding permission issues earlier as :
chmod 777 -R /test