高大上的网站文件索引——h5ai

本文目录

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

  1. Copy folder _h5ai to the document root directory of the web server: DOC_ROOT/_h5ai.
  2. 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.
  3. 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 below DOC_ROOT that don't have a index file.Apache httpd 2.2/2.4: in httpd.conf or in the root directory's .htaccess file set for example:

    lighttpd 1.4: in lighttpd.conf set for example:

    nginx 1.2: in nginx.conf set for example:

    Cherokee 1.2: in cherokee.conf set for example:

安装教程:

云盘下载

准备工作

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里自行设置,具体内容请百度

点赞
  1. 头像 焦大云系统说道:

    文件索引支持多大数据量的?

    1. 小文 小文说道:

      没测试过 官方文档也没说明

  2. 头像 矿物质水说道:

    请问怎么添加目录?

    1. 小文 小文说道:

      自动识别目录,你新建目录他就是目录。。。
      文件索引而已

  3. 头像 嘿嘿8abc说道:

    感谢你的回复,刚发表评论后回跳 评论 到这个页面,但确实发表成功了,望博主知晓!

    1. 小文 小文说道:

      这···
      可能是负载太高吧
      不知道今天谁故意拿我网站去测压去了 :symbols:

  4. 头像 hawkhost说道:

    看到代码就头疼,算了吧!

    1. 小文 小文说道:

      其实也就只需要上传源码,设置默认首页

发表回复

在发表评论前请确认您的言论中没有违反中国各项法律、法规和违背社会道德的内容。任何无意义的留言内容都会被直接删除。