d082d58
If you use SELinux, you need to ensure that the httpd_enable_cgi boolean is
d082d58
set properly.  This can be done via the command line, e.g.:
9c9db9d
d082d58
   # setsebool -P httpd_enable_cgi 1
9c9db9d
d082d58
Or you can use the graphical tool system-config-selinux, via System ->
d082d58
Administration -> SELinux Management on the Gnome menu.
9c9db9d
d082d58
Additionally, the git repositories need to be readable by the cgi.  This is
d082d58
handled automatically for repositories in the default path, /var/lib/git.  If
d082d58
your repositories are in a different path, /srv/git, for example, you can set
d082d58
the proper context using semanage:
9c9db9d
9eedf28
    # semanage fcontext -a -t git_sys_content_t "/srv/git(/.*)?"
9c9db9d
d082d58
If you have other confined daemons that need to access the git repositories,
a9267ec
you may want to use public_content_t, or public_content_rw_t instead.
9c9db9d
d082d58
Then use restorecon to update the contexts:
d082d58
d082d58
    # restorecon -RF /srv/git