I want to enable the Directory Index with Apache 2.4 on CentOS 6. First I edited httpd.conf
but it didn't work so I ended up with placing a .htaccess
file in the desired folder, hoping that no setting could override the .htaccess
directives.
But it didn't work either, when I request the directory I get a 403.
Here is what I tried so far:
Checked that
.htaccess
file is working by putting garbage in itPut those lines in
httpd.conf
:<Directory "/var/www/path/to/folder"> AllowOverride All </Directory>
Wrote those lines in
.htaccess
:DirectoryIndex disabled Require all granted Allow from all Options +Indexes
Checked if
mod_autoindex
is enabledRan
apache2ctl configtest
-> Syntax OKChanged file and directory ownership and group to apache,
.htaccess
permissions to 666
But nothing works, I just get the fancy "Testing 123.." Apache/CentOS Error page...
After Michael Hamptons comment I added the following step:
Set
httpd.conf
error level to 'debug'-> Nothing is logged in error_log
-> access_log logs just:
"GET / HTTP/1.1" 403 4897 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
... followed by 4 font requests fo the Error page, which seems to me like I am looking in the wrong file, or the error level setting doesn't work?