
求 start ~
autoindex for Nginx, 美化 Nginx 默认的目录文件 索引页, 支持简单响应式, 支持切换是否新窗口打开(点击底部 autoindex)
复制 .autoindex 目录至 D:\websites\fulicat
ps: D:\websites\fulicat\.autoindex
修改 nginx.conf 文件
# fulicat.bz server { listen 80; server_name fulicat.bz; root D:\websites\fulicat; location / { index index.html index.htm index.php; } # autoindex for nginx location ~ ^(.*)/$ { autoindex on; autoindex_localtime on; autoindex_exact_size off; #add_before_body /.autoindex/header.html; add_after_body /.autoindex/footer.html; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } 

1 beginor 2017-07-07 13:24:26 +08:00 |
2 shiji 2017-07-07 13:29:24 +08:00 via Android 我一直用一个叫 apaxy 的主题 |
3 ajan OP @shiji #2 我没用过这个,我的这个只是利用 nginx 的 add_after_body 向索引页追加一段代码,对页面进行简单的处理,没文件图标,没有排序。有兴趣的可以自行修改升级。 默认的都的文件列表太拥挤了,看着眼睛好累,也不支持在新窗口打开。也不支持移动端~ |
4 wonpn 2017-07-07 13:39:28 +08:00 via Android 支持 |
5 Leonn 2017-07-07 13:41:37 +08:00 所以 github 地址呢,, |
6 wellsc 2017-07-07 13:48:36 +08:00 via Android 不错 |
8 wireshark 2017-07-07 13:48:56 +08:00 这个 php 实现的 github 风格很好 https://raw.githubusercontent.com/phuslu/phuslu.github.io/master/autoindex.php |
10 msg7086 2017-07-11 05:16:33 +08:00 用 h5ai 的只有我一个? |
12 wsph123 2017-07-1 11:11:45 +08:00 感觉按照这个思路甚至可以加上翻页 排序 甚至搜索 预览 |
14 pxw2002 2019-03-07 11:58:15 +08:00 有办法隐藏文件时间吗 谢谢 |