我正在尝试在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,存储库列表(显然)正常显示。当我点击其中一个回购站时,当它尝试执行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.
是否有人可以帮助解决这个烂摊子?
为什么重写?把你的gitlist webapp放在任何你想要的地方,声明一个别名和一个目录,它应该就足够了(如https://github.com/VonC/compileEverything/blob/master/apache/env.conf.tpl#L41-L93 ) – VonC
重写是应用程序的一部分(它附带一个包含它的.htaccess)。我不知道它为什么在那里。正如我所指出的那样,我没有尝试过,而且我仍然遇到问题。你是说如果我把它移到我的web目录之外,问题就会消失吗? –
我只是指出其他技术来引用一个web应用程序,而不必使用重写。我将不得不测试gitlist,看看它是否也能这样工作。 – VonC