modern HTTP web server index


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.

Requires PHP 7.0+ and works fine with Apache httpd, lighttpd and nginx. Best user experience with the latest versions of Chromium-based browsers, Firefox, Safari and Edge, but a static fallback is provided for older browsers or if JavaScript is disabled.


There are lots of optional extensions and configuration options to customize the web appearance of your directory listings. All markup is valid HTML5 spiced up with CSS3 and finest JavaScript to build a fresh but minimal user interface and a user experience that focuses on your files.

Some of the optional features are: file sorting, different view modes, localization, a breadcrumb, a tree view, custom headers and footers, file filter and search, folder sizes, auto refresh, packaged download, QR codes, thumbnails, file previews


  1. Copy folder _h5ai to the document root directory of the web server: DOC_ROOT/_h5ai.

     ├─ _h5ai
     ├─ your files
     └─ and folders
  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 way h5ai 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:

    DirectoryIndex  index.html  index.php  /_h5ai/public/index.php

    lighttpd 1.4: in lighttpd.conf set for example:

    index-file.names += ("index.html", "index.php", "/_h5ai/public/index.php")

    nginx 1.2: in nginx.conf set for example:

    index  index.html  index.php  /_h5ai/public/index.php;

    Cherokee 1.2: in cherokee.conf set 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.


Custom installation

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 _h5ai to DOC_ROOT/some/folder/_h5ai:

 └─ some
     └─ folder
         ├─ _h5ai
         ├─ your files
         └─ and folders

Visit 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).

Works best with JavaScript enabled!Works best in modern browsers!