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

2 posts / 0 new
Last post
#1 Tue, 11/12/2013 - 11:46
goran.bladh3

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

It was without problems I could install Virtualmin on my Ubuntu PC. Setting up the webserver and mailserver also with no troubles. I have in the public directory created a .htaccess protected map in wich I would like to put files with .pdf, .excl and so on. I canĀ“t find how to or where to tell the server to allow this. I guess it is set like this in default for security reasons. Does anyone have a walkthrough to help me?

Thanks in advance

Tue, 11/12/2013 - 12:42
jimdunn

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

Topic locked