How to make HTTPD list directory of subdomain?

Posted on

Problem :

I have created a subdomain on my website using HTTPD and am wondering how to make it display the list of files in the directory instead of the Apache Test Page. Is there a directive I can add to the virtualhost for it?

Solution :

Turn on the Indexes option for the subdirectory. I.e. put

<Directory "directory-path">
    Options Indexes
</Directory>

into Apache’s httpd.conf.

Replace directory-path with the path to the subdirectory.

Leave a Reply

Your email address will not be published. Required fields are marked *