Posted: . At: 12:27 PM. This was 6 years ago. Post ID: 11783
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.

How to setup proper directory indexing in Apache.

To get proper directory indexing set up in a directory in your Apache webserver configuration, firstly, create a .htaccess file and paste the code below into it.

Options +Indexes
 
HeaderName HEADER.html
ReadmeName FOOTER.html
 
IndexIgnore .htaccess .??* *~ *# HEADER* FOOTER* README* RCS CVS *,v *,t *.inc

Then create a HEADER.HTML with this in it.

<html>
 
<head>
 
<title>Misc Files.</title>
 
</head>
 
<body>
<h1>Misc files for download</h1>

And a FOOTER.html with this in it.

</body>
</html>

This is how the directory can use fancy file listings.

This is what I got when I implemented this on my website.

http://www.securitronlinux.com/arma3/.

This makes your directory indexing look great and this is far better looking than the default style of the file listing. This is a nice example of the style of directory listing you can get with this setup.

https://securitronlinux.com/utilities/. This looks great and makes the listing very customizable with HTML and CSS.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.