Getting Directory index forbidden by Options directive when trying to list files using the .htaccess? Check to make sure that you DON’T see this in your httpd.conf or welcome.conf file.
The httpd.conf file will be at /usr/local/apachel/conf/httpd.conf on a server with cPanel and at /etc/httpd/conf/httpd.conf on a base CentOS install. The welcome.conf should be at /etc/httpd/conf.d/welcome.conf and my not exist at all on a cPanel server.
I like to check for those lines in the files using these commands.
grep -i indexes /etc/httpd/conf/httpd.conf ; grep -i indexes /etc/httpd/conf.d/welcome.conf
Make sure that everything is set to +Indexes in those files and add this in the .htaccess of the folder you would like to have a list of files in!
Chris March 9th, 2011
Posted In: Uncategorized