Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This has been driving me nuts. I'm running git 1.7.8.rc4 with Apache/2.2.14 on Lucid Ubuntu, and set up LDAP authentication. The authentication seems to be working fine, and i can pull, but i can't push without getting a 403 error.

[Fri Dec 16 20:04:25 2011] [error] [client] client denied by server configuration: /opt/tools/libexec/git-core/git-http-backend

My apache site file:

SetEnv GIT_PROJECT_ROOT /opt/git

ScriptAlias /git/ /opt/tools/libexec/git-core/git-http-backend/

<Directory "/opt/git">
        Options -Indexes FollowSymLinks
        AllowOverride AuthConfig FileInfo
        Order allow,deny
        Allow from all

<Directory "/opt/tools">
  AllowOverride None
  Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
  Order allow,deny
  Allow from all

<LocationMatch "^/git/.*/git-receive-pack$">
        Order deny,allow
        Deny from all
        AuthName "GIT Repo"
        AuthType Basic
        AuthBasicProvider ldap
        AuthzLDAPAuthoritative off
        AuthLDAPURL "ldap://,dc=com"
        Require valid-user

Everything i find regarding "client denied by server configuration" says "Add 'Order allow,deny / Allow from all' to the correct Directory entry." It's there, and it's still not working. Any ideas? I know i'm really close and is probably something super simple.

share|improve this question
up vote 0 down vote accepted

Solved. The issue was in the LocationMatch block:

Order deny,allow
Deny from all

was causing the 403 error. Change it to be permissive as in the Directory block and it changes to a 401, which turned out to be a problem with the LDAP authentication. I changed the AuthBasicProvider to 'external' and used pwauth as per (

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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