Skip to content

Customizable directory indexes for nginx without index modules

License

Notifications You must be signed in to change notification settings

reven/ngx-niceindex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ngx-niceindex

Customizable directory indexes for nginx without index modules

A directory indexer for nginx built to be simple, lightweight and easy to customize. It doesn't require indexer modules. It relies on xslt and css to generate clean html. It borrows heavily from nginx-indexer, ngx-superbindex and wilhelmy/dirlist.xslt

Requirements

nginx with the xslt module (included by default on Ubuntu packages).

Caveats

  • When nginx outputs autoindex data in xml, dates are GMT. There is no easy way to convert dates to local time in xslt1 and without additional packages.

Usage

  1. Clone the repository into a hidden .niceindex folder in the directory you want to list:

    git clone https://github.com/reven/ngx-niceindex.git .niceindex

  2. Add the following lines to the corresponding location in your nginx.conf file:

    location / {
        autoindex on;
        autoindex_format xml;
    
        xslt_stylesheet /path/to/your/directory/.niceindex/niceindex.xslt path='$uri';
    }
  3. Restart nginx with systemctl restart nginx and voilà!

ngx-niceindex_screenshot

About

Customizable directory indexes for nginx without index modules

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published