-1

I am trying to set up a git server that uses Apache for http authentication. This is a brand new install of Apache 2.2.15. When a user tries to clone a git repository, I am getting lines in /var/log/httpd/error_log that say

[error] [client xx.xx.xx.xx] Directory index forbidden by Options directive: /srv/git/

I am fairly certain that my httpd.conf file is correct, I have a section that reads

<Directory "/srv/git">
    Options +ExecCGI +Indexes +FollowSymLinks -MultiViews
    AllowOverride None
    Order allow, deny
    Allow from all
</Directory>

There is also no other place in httpd.conf where Indexes is turned off.

What could be the cause of this error message?

I am posting this question because I could not find a solution to my problem on StackExchange, but I did eventually solve this problem

1

One possible solution is to removing the file welcome.conf' from theetc/httpd` directory. (Or, just deleting it)

mkdir ~/apache_backup
mv /etc/httpd/conf.d/welcome.conf ~/apache_backup/

Then, check to see if that was the only file that was preventing the Indexes option. Run grep -iR 'Indexes' /etc/httpd/* to check which, if any files contain a line Options -Indexes. If they do, delete those files. welcome.conf has indexes turned off by default.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.