mirror of
https://github.com/uzinfocom-org/autoindex.git
synced 2026-02-15 23:29:44 +00:00
🕸️ | Custom autoindex directory listing for nginx [maintainer=@yetimdasturchi]
- JavaScript 78.8%
- HTML 20.6%
- CSS 0.6%
| .html | ||
| LICENSE | ||
| location.config | ||
| README.md | ||
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;
}
}