Home » Categories » Webmin » Virtualmin

How to show content (files) in directory in browser?

To enable directory listings for a folder on your web site:

- If a directory doesn't contain an index file (index.html, index.htm, index.php, etc) then you get an error message

- If you want them to see all the files in a directory, create an .htaccess file in the directory, containing this one line:

Options +Indexes

- Then remove any index files and the directory will display all files

More options:

Options +Indexes
IndexOptions FancyIndexing FoldersFirst NameWidth=* DescriptionWidth=*

Options +Indexes
IndexOptions FancyIndexing FoldersFirst NameWidth=30 DescriptionWidth=30

Options +Indexes
IndexOptions FancyIndexing FoldersFirst SuppressIcon

 

Ref:

https://www.virtualmin.com/node/31112

 

Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
 
Attachments Attachments
There are no attachments for this article.
Comments Comments
There are no comments for this article. Be the first to post a comment.
Related Articles RSS Feed
Virtualmin - Installing PHP 7.4 and/or 8.0 on CentOS 7
Viewed 4147 times since Tue, Dec 28, 2021
Where is path for rh-php73 in CentOS
Viewed 1172 times since Fri, Feb 5, 2021
Add cron jobs directly to Scheduled Cron Jobs
Viewed 925 times since Tue, Jul 19, 2022
Allow user to create database in a virtual domain
Viewed 743 times since Thu, Feb 4, 2021
Multiple PHP Versions - Installing PHP 7.4 and/or 8.0 on CentOS 7
Viewed 1188 times since Wed, Dec 22, 2021