h5ai makes browsing directories on HTTP web servers more pleasant. Directory listings get styled in a modern way and browsing through the directories 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.
The sources and a changelog are available on GitHub.
Some of the optional features:
- breadcrumb and tree view for faster browsing
- different view modes
- auto refresh of folder content
- custom header and/or footer for each directory
- packaged download of selected content (
- filter for displayed files and folders
- folder sizes
- localization with lots of languages already included
- image and text file preview (including Markdown rendering)
- thumbnails for images, movies and PDFs
- QR codes on hovering files
- sorting by name, date or size
Requires PHP 5.2.1+
_h5aito the document root directory of your web server and visit
http://YOUR-DOMAIN.TLD/_h5ai/. This page will give you some hints on your server's capabilities.
/_h5ai/server/php/index.phpto the end of your webservers default index-file list. All directories that don't have a valid index file will get styled by h5ai.
Examples of the second step for all tested web servers:
Apache httpd 2.2/2.4: in
httpd.confor in any directory's
.htaccessfile set for example:
DirectoryIndex index.html index.php /_h5ai/server/php/index.php
lighttpd 1.4: in
lighttpd.confset for example:
index-file.names += ( "index.html", "index.php", "/_h5ai/server/php/index.php" )
nginx 1.2: in
nginx.confset for example:
index index.html index.php /_h5ai/server/php/index.php;
Cherokee 1.2: in
cherokee.confset for example:
vserver!1!directory_index = index.html,index.php,/_h5ai/server/php/index.php
It's possible to install h5ai into any sub directory of your web server's document root directory. This directory will then be considered the root directory when indexing your files.
For example copy folder
[DOC_ROOT]/some/folder/_h5ai and then browse to
http://YOUR-DOMAIN.TLD/some/folder/_h5ai/ to see if everything works fine. This page will show you what additional index file entry you have to add to your
default index file list (as in step 2 above). For this example that would be
Please note that h5ai does not work with aliased folders (as available in Apache httpd). Aliased folders make it impossible to map URLs to
file system folders. Actually any web server specific things aren't supported. That includes access restrictions! Best chance to make restricted areas work and secure might be to place folder
_h5ai completely inside that resticted area. Use on your own risk.
The main configuration file is
_h5ai/conf/options.json. You might want to adjust some of the documented settings. But there are some more files in the
_h5ai/conffolder you might have a look at.
h5ai is provided under the terms of the MIT License. It profits from a lot of other great projects.