I'm trying to create a subdomain for hosting files and no matter what I try, autoindex doesn't do anything. I can successfully redirect "public.example.com" to "example.com", but any configuration for directory listing always gives me the default Nginx welcome page.
1 Answer
The reason for the behaviour was the certbot automatically adding conflicting entries in the "default.conf" file for every subdomain I issue a certificate for (configuration for my website was defined in "example.com.conf"). For whatever reason it didn't interfere with "example.com" and "www.example.com" despite the default configuration being completely wrong. Deleting the symlink to "default.conf" from "sites-enabled" solved the issue.