I’m trying to enable directory listing on one of my directories (domain.tld/mng). First I added this to my .conf file:
location = /mng {
autoindex on;
}
It doesn’t work so I have to do this:
location = /mng/ {
autoindex on;
}
And it worked on domain.tld/mng/ but when I try to access my subdirectories like domain.tld/mng/01/ I get a 403 Forbidden error code. All the subdirectories have 755 permissions and is owned by the webserver (in my case, nginx:nginx). I wonder what could be wrong?
BTW, I’m using a wordpress website.
as posted by anonymous user, I just have to change the rule to this:
and it worked on all the subdirectories. Thank you.