§2023-04-11

¶By ChatGPT

  • set up Nginx to display directory listing, follow these steps:
    • in nginx.conf find the server block that corresponds to the website you want to configure.
    • Within the server block, add the following lines:
location /directory {
    autoindex on;
    autoindex_exact_size off;
    autoindex_localtime on;
}
- Replace /directory with the path to the directory you want to display the listing for.
Return to Top