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 for HTML5 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.
Some of the optional features are:
sorting – view modes – localization – breadcrumb – tree view – custom headers+footers – filter+search – folder sizes – auto refresh – packaged download – QR codes – thumbnails – image+text+audio+video preview
_h5aito the document root directory of the web server:
DOC_ROOT ├─ _h5ai ├─ your files └─ and folders
http://YOUR-DOMAIN.TLD/_h5ai/public/index.php, to check if h5ai is reachable. This page shows some hints on the server's capabilities.
/_h5ai/public/index.php(note the leading slash!) to the end of the default index-file list. In this way h5ai will manage all directories in and below
DOC_ROOTthat don't have a index file.
Apache httpd 2.2/2.4: in
httpd.confor in the root directory's
.htaccessfile set for example:
DirectoryIndex index.html index.php /_h5ai/public/index.php
lighttpd 1.4: in
lighttpd.confset for example:
index-file.names += ("index.html", "index.php", "/_h5ai/public/index.php")
nginx 1.2: in
nginx.confset for example:
index index.html index.php /_h5ai/public/index.php;
Cherokee 1.2: in
cherokee.confset for example:
vserver!1!directory_index = index.html,index.php,/_h5ai/public/index.php
The main configuration file is
_h5ai/private/conf/options.json. You might want to change some of the documented settings. But there are some more files in
_h5ai/private/conf you might have a look at.
No web server specific things are supported, that includes access restrictions! Best chance to make restricted areas work and secure might be to place folder
_h5aicompletely inside that resticted area. Use it at your own risk!
Does not work with aliased folders in general (as available in Apache httpd). Aliased folders make it impossible to map URLs to file system folders.
If no icons are displayed, chances are that you have to add the SVG MIME-type to your server.
On Ubuntu servers you might need to install an additional package for PHP JSON support.
To use optional features based on shell commands the PHP functions
passthrumust not be disabled in
php.ini(have a look for
There was a security flaw in versions v0.22.0 - v0.24.1 that was fixed in v0.25.0 (summer 2014). If you are still using one of these versions you are advised to upgrade.
It's possible to install h5ai into any sub directory of your web server's document root. This directory will then be considered the root directory when showing a breadcrumb etc.
For example copy folder
DOC_ROOT └─ some └─ folder ├─ _h5ai ├─ your files └─ and folders
http://YOUR-DOMAIN.TLD/some/folder/_h5ai/public/index.php to see if everything works fine. In this example you need to add
/some/folder/_h5ai/public/index.php to your index-file list (as in step 3 above).