We want to implement a user-friendly web interface for accessing a public file repository. We will use AutoIndex which works with PHP 5 (but maybe not all later versions). This guide assumes the following:
As user website retrieve the AutoIndex tarball, unpack it to the repository base directory (e.g. /home/website/www/website/public) and set the correct file attributes:
> wget http://prdownloads.sourceforge.net/autoindex/AutoIndex-2.2.4.tar.gz -P ./
> tar -xvzf ./AutoIndex-2.2.4.tar.gz --strip-components 1 -C /home/website/www/website/public/
> find /home/website/www/website/public -maxdepth 1 -type f | xargs chmod -x
Edit the directives for the repository directory in the Apache configuration file of the vhost user (e.g. /etc/httpd/conf.d/website.conf):
<Directory /home/website/www/website/public>
DirectoryIndex index.php
</Directory>
Test and reload the Apache configuration:
> apachectl -t
Syntax OK
> sudo systemctl reload httpd
From your web browser connect to the PHP configuration page (e.g. https://website/tld/public/index.php). Set and save the AutoIndex configuration parameters which will be saved to AutoIndex.conf.php in the public directory (e.g. /home/website/www/website/public/AutoIndex.conf.php).
Edit hidden_files to add names and patterns of files and subdirectories that will not displayed in the AutoIndex directory listing (e.g. /home/website/www/website/public/hidden_files).
Modify display and other parameters by editing files in the templates subdirectory (e.g. /home/website/www/website/public/templates). See the readme.html file in templates for more information.
You may optionally remove the information files which were extracted from the AutoIndex tarball:
> rm /home/website/www/website/public/{change_log,license,readme}.html