HostOnNet Blog

Apache Directory Listing

Looking for Linux Server Admin or WordPress Expert? We can help.

To enable Directory Listing in Apache, add following to .htaccess file.

Options +Indexes

if you want to do this in httpd.conf file, in your virtual host entry, add something like

<VirtualHost 127.0.0.1:80>
        ServerName hostonnet.dev
        ServerAdmin [email protected]
        SetEnv APP_ENV "dev"
        DocumentRoot /home/www/hostonnet.com
        CustomLog ${APACHE_LOG_DIR}/hostonnet.co.log combined
        <Directory "/home/www/hostonnet.com">
            Options All +Indexes
            AllowOverride All
            Require all granted
            Order allow,deny
            allow from all
        </Directory>
</VirtualHost>

Posted in Apache

Leave a Reply

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

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