I finally figured out how to show a directory listing of a folder using nginx. The problem is that it shows every file and directory in that folder. Is it possible to filter the results? Like show only files with a specific extension or something like that? Thanks
No, the auto-index feature does not support filtering. But you can change permissions of the files to not be visible/served, but that only works if you dont want them accessible at all.
You could try to manually modify the body response with sub_module using regexp that matches files to hide.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With