Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • So if I get it right, an incoming request to the webserver just reaches the http://hostname/git part of the url and the foo/bar.git part (which resides inside the PATH_INFO variable) is combined with the GIT_PROJECT_ROOT to access the repository itself. And secondly, is this the reason why the webserver returns a 404 error if you're trying to access the http://hostname/git/ folder in your webbrowser? Commented Nov 4, 2019 at 14:34
  • (1) Yes and (2) I would guess that depends on your Apache configuration, i.e. if it finds an index.html, index.php or whatever (see DirectoryIndex) or if directory listings are allowed (Options Indexes). Look into your Apache error.log if there is more information. Commented Nov 4, 2019 at 18:41
  • The problem occured because of my Apache2 configuration: The ScriptAlias setting had the same url path (/repos/git) as the repositories on the local filesystem (DocumentRoot /repos/git). So if you call http://hostname/git the webserver passed the request always to the CGI script instead of serving the files to the webbrowser. Setting ScriptRoot to a fictive path (/git/) and let the repos reside in /repos/git solved it. Commented Nov 4, 2019 at 19:48