You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Denny Schierz <li...@4lin.net> on 2013/03/22 17:24:44 UTC

[users@httpd] Problem Redmine/chiliproject with grack(git) and DocumentRoot or Location

hi,

I have problems to get grack (git wrapper https://github.com/schacon/grack) running in the same virtualHost configuration for Redmine/Chiliproject.  

Gtrack works fine with the following VirtualHost configuration:

==========================
<VirtualHost 192.168.1.1:443>
        SSLEngine on
        SSLCertificateFile    /etc/apache2/ssl/git.pem
        SSLCertificateKeyFile /etc/apache2/ssl/git.pem
        SSLCertificateChainFile /etc/apache2/ssl/chain.pem

  ServerName git.domain.local
  DocumentRoot /var/www/git/public
   PerlLoadModule Apache::Redmine

  <Directory /var/www/git/public>
    Options None
    AllowOverride None
    Order deny,allow
    Allow from all
  </Directory>

<Location "/">
        AuthType Basic
        AuthName "Git Repositories"
        Require valid-user

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

        ## for mysql
        RedmineDSN "DBI:mysql:database=chiliproject;host=localhost"

        RedmineDbUser "chiliproject"
        RedmineDbPass "secret"
        #Cache the last 50 auth entries
        # RedmineCacheCredsMax 50
        RedmineGitSmartHttp yes
</Location>
============================ 

# ls /var/www/git/
config.ru  examples  install.txt  lib  public  Rakefile  README.md  robots.txt	tests  tmp

I'm also able to clone the git repository on the server /var/chilli/git/mygit-test.git

via git clone https://user@git.domain.local/mygit-test.git

Grack knows the real path from the configuration file:

# cat /var/www/git/config.ru
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/lib')

use Rack::ShowExceptions

require 'git_http'

config = {
  :project_root => "/var/chili/git",
  :git_path => '/usr/bin/git',
  :upload_pack => true,
  :receive_pack => true,
}

run GitHttp::App.new(config)


Now I tried to move the configuration to my Redmine/Chiliproject configuration:

(this configuration is from my other virtual host, so the paths differs)

<VirtualHost 19.168.1.2:443>

PerlLoadModule Apache::Redmine
PerlLoadModule  Authen::Simple::LDAP
PerlLoadModule  IO::Socket::SSL

[…]

        ServerName scm.domain.local
        DocumentRoot /var/scm/fg/st/htdocs

        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>

        <Directory /var/scm/fg/st/htdocs/>
                Options FollowSymLinks
                AllowOverride None
        </Directory>

	# Symlink to Chiliproject public folder
        RailsBaseURI /scm
        <Directory /var/scm/fg/st/htdocs/scm>
                Options FollowSymLinks -MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>


  <Directory /var/scm/fg/st/htdocs/git/public/>
    Options None
    AllowOverride None
    Order deny,allow
    Allow from all
  </Directory>

# Now /git instead of "/"
<Location "/git">
        AuthType Basic
        AuthName "Git Repositories"
        Require valid-user

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

        ## for mysql
        RedmineDSN "DBI:mysql:database=chiliproject-st;host=localhost"

        RedmineDbUser "chiliproject"
        RedmineDbPass "secret"
        #Cache the last 50 auth entries
        # RedmineCacheCredsMax 50
        RedmineGitSmartHttp yes
</Location>


But if I want to clone a git:

# clone https://foobar@scm.domain.local/foobar-git-test.git
Cloning into 'foobar-git-test'...
fatal: https://foobar@scm.domain.local/foobar-git-test.git/info/refs not found: did you run git update-server-info on the server?


Error log: [error] [client 192.168.1.100] File does not exist: /var/scm/fg/st/htdocs/git/foobar-git-test.git

It seems, that the configuration file from grack was never read

Has anybody a tipp for me?

cu denny


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org