与Gerrit安装卡住
问题描述:
我开始使用Gerrit代码审查,并坚持安装。 gerrit中的“etc”文件夹中有gerrit.conf文件。与Gerrit安装卡住
这是我的gerrit.config文件:
[gerrit]
basePath = git
canonicalWebUrl = http://localhost:8081/
[database]
type = mysql
hostname = localhost
database = reviewdb
username = gerrit2
[index]
type = LUCENE
[auth]
type = HTTP
[receive]
enableSignedPush = false
[sendemail]
smtpServer = localhost
[container]
user = mvemur001c
javaHome = C:\\Program Files\\Java\\jdk1.8.0_65\\jre
[sshd]
listenAddress = *:29418
[httpd]
listenUrl = http://*:8081/
[cache]
directory = cache
我需要做什么吗?我应该写下面的代码吗?如果其他地方应该写这个Apache配置文件?
<VirtualHost *:8081>
ServerName localhost
ProxyRequests Off
ProxyVia Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location "/login/">
AuthType Basic
AuthName "Gerrit Code Review"
AuthBasicProvider file
AuthUserFile /usr/local/apache/passwd/passwords
Require valid-user
</Location>
ProxyPass/http://localhost:8081/
答
您不能让Gerrit和Apache同时在端口8081上运行。 Apache无法启动,对吧?请参阅docs。您目前直接连接到Gerrit,而不是通过Apache。
更改在<VirtualHost *:8081>
和canonicalWebUrl
指定的端口号。