2013-01-04 5 views
5

CentOS Linuxでgitlistをセットアップしようとしています(gitoliteが重要な場合に備えて - gitoliteが管理するrepoディレクトリの権限を緩和しました)。gitlistはリポジトリリスト以外のものを取得できません

今日からgitlist.orgからバージョン0.3のtarballを抽出しました。

私のconfig.iniは、次のようになります。httpd.confの

client = '/usr/bin/git' ; Your git executable path 
repositories = '/home/gitolite/repositories/' ; Path to your repositories 

[app] 
debug = true  
; I don't know if baseurl is still needed..seems like my results are the same either way 
baseurl = 'http://sub.example.com.com/gitlist' ; Base URL of the application 

仮想ホストディレクティブ:

<VirtualHost *:80> 
    DocumentRoot /var/www/html 
    ServerName sub.example.com 
    <Directory "/var/www/html"> 
    AllowOverride All 
    Options -Indexes 
    </Directory> 
</VirtualHost> 

htaccessファイル:この設定で

<IfModule mod_rewrite.c> 
    Options -MultiViews 

    RewriteEngine On 
    RewriteBase /var/www/html/gitlist/ 

    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteRule ^(.*)$ index.php [L,NC] 

    AuthName "Git List" 
    AuthType Basic 
    AuthUserFile /var/www/.gitlistpwds 
    Require valid-user 

</IfModule> 
<Files config.ini> 
    order allow,deny 
    deny from all 
</Files> 

http://sub.example.com/gitlistに行きます/index.phpが存在しないことを示すブラウザのエラーメッセージが表示されます(つまり、実行しようとしています)。 /var/www/html/index.php)

この場合、http://sub.example.com/gitlist/index.phpに行くと、リポジトリリスト(明らかに)が正しく表示されます。 reposのいずれかをクリックすると、実行しようとすると何かがうまくいかない、git。私が手:

Whoops, looks like something went wrong. 

1/1 RuntimeException: Unknown option: -c 
(std git usage message omitted) 

私は.htaccessファイルからの書き換えルールを削除すると、私はどちらかがindex.phpのかを指定することで、インデックスページにアクセスできるようにしています。しかし、その場合、私はレポをクリックしたとき、それはgitlistディレクトリの下にレポを見つけようとして:

The requested URL /gitlist/testing.git/ was not found on this server. 

誰かがこの混乱を整理助けてくださいことはできますか?

+0

なぜ書き換えられますか?エイリアスとディレクトリを宣言して、必要な場所にgitlist webappを置くと、十分なはずです(https://github.com/VonC/compileEverything/blob/master/apache/env.conf.tpl#L41-L93のように)。 ) – VonC

+0

書き換えは、アプリケーションの一部です(それを含む.htaccessとともに出荷されます)。なぜそこにいるのかわかりません。私が指摘したように、私はそれを試してみたが、まだ問題があった。あなたが私のウェブディレクトリの外にそれを移動すると、問題は消え去るだろうと言っていますか? –

+0

私は、リライトを使わずにWebアプリケーションを参照する他のテクニックを指摘しています。私はgitlistをテストし、それがあまりにも機能するかどうかを見なければならないでしょう。 – VonC

答えて

1

私はついにgitlistをテストすることができました。

私は.htaccessを除去し、httpd.confで以下の設定を保持:

# GitList on 28473 
<IfModule !php5_module> 
    LoadModule php5_module modules/libphp5.so 
</IfModule> 
Listen 28473 
<VirtualHost aserver.prod.fr.company:28473> 
    ServerName aserver.prod.fr.company 
    ServerAlias aserver 
    SSLCertificateFile "/home/vonc/apache/crt" 
    SSLCertificateKeyFile "/home/vonc/apache/key" 
    SSLEngine on 
    SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL 
    SetEnv GIT_HTTP_BACKEND "/home/vonc/usr/local/apps/git/libexec/git-core/git-http-backend" 
    DocumentRoot /home/vonc/gitlist/github 
    Alias /gitlist /home/vonc/gitlist/github 
    <FilesMatch "\.(cgi|shtml|phtml|php)$"> 
     SSLOptions +StdEnvVars 
    </FilesMatch> 
    <FilesMatch ".php$"> 
     SetHandler application/x-httpd-php 
    </FilesMatch> 
    <FilesMatch ".phps$"> 
     SetHandler application/x-httpd-php-source 
    </FilesMatch> 
    <Directory /home/vonc/gitlist/github> 
     SSLOptions +StdEnvVars 
     Options ExecCGI +Indexes +FollowSymLinks 
     AllowOverride All 
     order allow,deny 
     Allow from all 
     Options -MultiViews 

     DirectoryIndex index.php 
     RewriteEngine On 

     RewriteBase /home/vonc/gitlist/github/ 
     RewriteCond %{REQUEST_FILENAME} !-f 
     RewriteRule ^(.*)$ gitlist/index.php/$1 [L,NC] 

    </Directory> 

    # RewriteLog "/home/vonc/gitlist/logs/apache_gitlist_rewrite_log" 
    # RewriteLogLevel 3 
    CustomLog "/home/vonc/gitlist/logs/apache_gitlist_ssl_request_log" \ 
       "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" 
    ErrorLog "/home/vonc/gitlist/logs/apache_gitlist_error_log" 
    TransferLog "/home/vonc/gitlist/logs/apache_gitlist_access_log" 
    LogLevel info 
</VirtualHost> 

my own commit、およびthis setupから)こと

注:これは、実行中のためです

  • を独自のサブディレクトリにgitlist:https://myServer/gitlist(だけではなくhttps://myserver
  • gitリポジトリ内のサブディレクトリの下にファイルを表示しません:Issue 250を参照してください。パッチは保留中です
+0

VonCに感謝します。私の主な問題は、私が言及した未知のオプションエラーを中心にしていました。これはgit実行可能ファイルを更新することで修正されました。私は私のリポジトリにアクセスしようとするとまだエラーが出ていますが、そのエラーは 'gitリポジトリ(または親ディレクトリのいずれでもない)です:.git'は私の元の質問/問題に関連していないようです。 –

関連する問題