Skip to content

🕸️ | Custom autoindex directory listing for nginx

License

Notifications You must be signed in to change notification settings

kibertexnik/autoindex

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

oss-autoindex

🕸️ | Custom autoindex directory listing for nginx

Copy .html folder to the folder you want to index and add the location.config file to nginx server.

Sample server:

server{
        listen 80;

        root /media/files;

        server_name _;

        location / {
               try_files $uri $uri/ =404;
               add_before_body /.html/top.html;
               add_after_body /.html/bot.html;
               autoindex on;
               autoindex_localtime on;
               autoindex_exact_size on;
               sub_filter '<html>' '';
               sub_filter '<head><title>Index of $uri</title></head>' '';
               sub_filter '<body bgcolor="white">' '';
               sub_filter '</body>' '';
               sub_filter '</html>' '';
               sub_filter_once on;
        }
}

About

🕸️ | Custom autoindex directory listing for nginx

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 78.3%
  • HTML 21.1%
  • CSS 0.6%