Howtos/Autoindex on nginx

From creative crowd wiki
Jump to navigation Jump to search

You can activate autoindex on the main server folder (/var/www/html/) and/or home folders (~/public_html/).

autoindex

/var/www/html/

~/public_html/

location ~ ^/~(.+?)(/.*)?$ {
    autoindex on; 
}

fancyindex !

https://nginx-extras.getpagespeed.com/modules/fancyindex/

https://installati.one/install-libnginx-mod-http-fancyindex-debian-12/

To install the fancyindex module:

$ sudo apt install libnginx-mod-http-fancyindex

Then in your nginx config, you can add:

fancyindex on;