title: Apache and git-http-backend
body: <p>I am currently setting up some git repositories on a Ubuntu LTS 14.04 machine with Apache 2.4.7. </p>
  
  <p>This is the apache config:</p>
  
  <pre><code>SetEnv GIT_PROJECT_ROOT /var/www/html/git
  SetEnv GIT_HTTP_EXPORT_ALL 1
  SetEnv REMOTE_USER $REDIRECT_REMOTE_USER
  ScriptAliasMatch \
      "(?x)^/git/(.*/(HEAD | \                                                                                                                             
                      info/refs | \                                                                                                                        
                      objects/(info/[^/]+ | \                                                                                                              
                               [0-9a-f]{2}/[0-9a-f]{38} | \                                                                                                
                               pack/pack-[0-9a-f]{40}\.(pack|idx)) | \                                                                                     
                      git-(upload|receive)-pack))$" \                                                                                                      
      /usr/lib/git-core/git-http-backend                                                                                                                   
  
  &lt;Location /git/oswald.git&gt;
   Options +ExecCGI
   AuthType Basic
   DAV on
   AuthName "Git"
   AuthUserFile /etc/apache2/git_paragon_passwd
   Require valid-user
  
      Order allow,deny
      Allow from all
  &lt;/Location&gt;
  </code></pre>
  
  <p>The test repository is under <code>/var/www/html/git/oswald.git</code>. In the repository I have set the config property</p>
  
  <pre><code>http.receivepack=true
  </code></pre>
  
  <p>The file <code>git-daemon-export-ok</code> is present.</p>
  
  <p>If I now try to clone with:</p>
  
  <pre><code>git clone https://server/git/oswald.git
  </code></pre>
  
  <p>after authentication I get:</p>
  
  <pre><code>fatal: https://server/git/oswald.git/info/refs not valid: is this a git repository?
  </code></pre>
  
  <p>(git 2.1.0 client, on the server git 1.9.1). </p>
  
  <p>I tried several things, so if I don't use git-http-backend and go via WebDAV I can clone but not push, with git-http-backend I cannot even clone. </p>
  
  <p>If I change the last line of <code>ScriptAliasMatch</code> from</p>
  
  <pre><code>/usr/lib/git-core/git-http-backend
  </code></pre>
  
  <p>to </p>
  
  <pre><code>/usr/lib/git-core/git-http-backend/$1
  </code></pre>
  
  <p>as stated in the <a href="https://www.kernel.org/pub/software/scm/git/docs/git-http-backend.html" rel="noreferrer">man page of git-http-backend</a>, I get </p>
  
  <pre><code>fatal: repository 'https://server/git/oswald.git/' not found
  </code></pre>
  
  <p>with the error.log from Apache:</p>
  
  <pre><code>AH00130: File does not exist: /usr/lib/git-core/git-http-backend/oswald.git/info/refs
  </code></pre>
  
  <p>Does anybody have an idea what is wrong? I have already spent a lot of time going through forums, but no suggestions there did help so far.</p>