This is so stupid. You'll see all of these guides about compiling nginx w/ the module, etc etc -- forget all of that!
sudo apt-get install libnginx-mod-http-fancyindex
DONE. That is it.. at least for the prep. Now you can use
server {
listen 443 ssl;
server_name dl.site.name *.dl.site.name;
index index.html index.php index.htm;
root /var/www/site.name/dl;
location / {
try_files $uri $uri/ =404;
auth_basic "Restricted Content";
auth_basic_user_file /etc/nginx/.htpasswd;
fancyindex on;
fancyindex_exact_size off;
fancyindex_css_href /assets/style.css;
fancyindex_ignore assets robots.txt readme.md;
fancyindex_time_format "%b %y";
fancyindex_header /assets/header.html;
fancyindex_footer /assets/footer.html;
fancyindex_show_path off;
fancyindex_name_length 40;
}
I specified the stylesheet location in my header, so you don't really need that here if you're like me. I don't know why these other guides are over-complicating it. There's probably a reason, but I just want to share some shit, man.
Does someone how to use it in the _/nginx docker image?