h5ai is a modern file indexer for HTTP web servers with focus on your files. Directories are displayed in a appealing way and browsing them is enhanced by different views, a breadcrumb and a tree overview. Initially h5ai was an acronym forHTML5 Apache Index but now it supports other web servers too.
See the demo directory with most features enabled. A reduced example and my actual use case is the release directory for the projects on this page.
Requires PHP 5.5+ and works fine with Apache httpd, lighttpd, nginx and Cherokee. Best user experience with the latest versions of Chrome, Firefox, Opera, Vivaldi, Safari and Edge, but a static fallback is provided for older browsers or if JavaScript is disabled.
h5ai是一款免费的开源产品,主要用于网站文件或资源的索引,昨天已经将大部分资源同步到了这个资源站里d.qcgzxw.cn
由于我服务器带宽不够,我还是将文件暂存在蓝奏云,利用html代码的方式列出了部分文件的索引,但是中文编码的问题还没解决,现在我来分享一下h5ai的安装与配置。
示意图:
使用文档(原文)
Installation
- Copy folder
_h5ai
to the document root directory of the web server:DOC_ROOT/_h5ai
.
12345DOC_ROOT├─ <strong>_h5ai</strong>├─ your files└─ and folders - Visit
http://YOUR-DOMAIN.TLD/_h5ai/public/index.php
, to check if h5ai is reachable. This page shows some hints on the server's capabilities. - Add
/_h5ai/public/index.php
(note the leading slash!) to the end of the default index-file list. In this wayh5ai will manage all directories in and belowDOC_ROOT
that don't have a index file.Apache httpd 2.2/2.4: inhttpd.conf
or in the root directory's.htaccess
file set for example:
1DirectoryIndex index.html index.php <strong>/_h5ai/public/index.php</strong>
lighttpd 1.4: inlighttpd.conf
set for example:
1index-file.names += ("index.html", "index.php", "<strong>/_h5ai/public/index.php</strong>")
nginx 1.2: innginx.conf
set for example:
1index index.html index.php <strong>/_h5ai/public/index.php</strong>;
Cherokee 1.2: incherokee.conf
set for example:
1vserver!1!directory_index = index.html,index.php,<strong>/_h5ai/public/index.php</strong>
安装教程:
云盘下载准备工作
1.PHP5.5以上版本
2.h5ai最新版本(已给出下载链接)
具体步骤
1.下载h5ai最新版本,解压,将得到的_h5ai上传至网站根目录
2.访问http://你的域名/_h5ai/public/index.php查看环境是否全部配置成功(密码留空,直接点登陆)
3.添加默认首页为/_h5ai/public/index.php
例如:index index.html index.php /_h5ai/public/index.php;
4.访问首页,出现索引页面即视为成功
细节与优化
默认的页面是很low的,也没啥功能,这就需要我们自行去编辑private/conf/options.json这个配置文件,不会设置的我分享我的配置文件给大家。
本地下载
使用说明:
直接上传文件或者文件夹至网站根目录,别人即可下载访问,服务器带宽不够的也可以向我一样,写个HTML文件跳转到蓝奏云下载页面。隐藏文件和隐藏文件夹需在options.json里自行设置,具体内容请百度
文件索引支持多大数据量的?
没测试过 官方文档也没说明
请问怎么添加目录?
自动识别目录,你新建目录他就是目录。。。
文件索引而已
感谢你的回复,刚发表评论后回跳
到这个页面,但确实发表成功了,望博主知晓!
这···
可能是负载太高吧
不知道今天谁故意拿我网站去测压去了
看到代码就头疼,算了吧!
其实也就只需要上传源码,设置默认首页