Bootstrap 4 theme for NGINX server with ngx-fancyindex module. Minimal, modern and simple. Comes with a search form (only in current directory)
- Make sure you have the ngx-fancyindex module compiled with NGINX, either by compiling it yourself or installing nginx via the full distribution (package
nginx-extras
for Ubuntu ornginx-mainline-mod-fancyindex
from AUR for Arch Linux). - Add
fancyindex on;
,fancyindex_header "/_index/header.html";
,fancyindex_footer "/_index/footer.html";
directives to your serverlocation { }
block. - Move the
_index/
folder to the root of the site directory. - Edit links in
_index/header.html
and_index/footer.html
. - Restart/reload NGINX webserver.
- Check that it's working and enjoy!
A standard config looks something like this:
fancyindex on;
fancyindex_localtime on;
fancyindex_exact_size off;
# Specify the path to the header.html and foother.html files (server-wise)
fancyindex_header "/_index/header.html";
fancyindex_footer "/_index/footer.html";
# Ignored files will not show up in the directory listing, but will still be public.
fancyindex_ignore "HideMeFromListing";
# Maximum file name length in bytes, change as you like.
fancyindex_name_length 255;
Working example can be checked out at https://files.llorephie.org/.
To ignore some directories and files to be publically listed append .
to beginning of filename.