#<IfModule mod_rewrite.c>
#    RewriteEngine On
#    RewriteCond %{REQUEST_URI} ^/git/?$
#    RewriteRule ^/git /gitweb [R=301,L]
##    RewriteRule ^/git/$ /gitweb/ [L,R]
#</IfModule>

PerlLoadModule Apache::Authn::Redmine

SetEnv GIT_PROJECT_ROOT /var/lib/git
SetEnv GIT_HTTP_EXPORT_ALL

ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/

<Location /git/>
  Order allow,deny
  Allow from all

  PerlAccessHandler Apache::Authn::Redmine::access_handler
  PerlAuthenHandler Apache::Authn::Redmine::authen_handler

  AuthType Basic
  AuthName Git
#  <LimitExcept GET PROPFIND OPTIONS REPORT>
#    SSLRequireSSL
#  </LimitExcept>

  # for Redmine Authentication
  RedmineDSN "DBI:mysql:database=redmine;host=127.0.0.1"
  RedmineDbUser "redmine"
  RedmineDbPass ""
  RedmineGitSmartHttp yes

  Require valid-user

#  SetEnvIf Request_URI "^/git/$" allow
#  Order allow,deny
#  Allow from env=allow
#  Satisfy any
</Location>
