I have a server at DigitalOcean with Ubuntu, CyberPanel, and OpenLiteSpeed, and wanted one of my websites to display an auto index of all the files uploaded to it.
There is a default.php
script in /usr/local/lsws/share/autoindex
that simulates Apache’s auto index, which suffices for my needs, but if you don’t want to use the default, you could copy and edit default.php
to create your own template.
Now, to enable and use this auto index, you have to adjust the index
directive in your website’s virtual host configuration file:
index { useServer 1 indexFiles index.php, index.html autoIndex 1 }Continue reading