【发布时间】:2016-12-15 20:52:59
【问题描述】:
我在使用 HTTP auth 安装 gerrit 时遇到问题。
这是我的 gerrit.config:
[gerrit]
basePath = git
serverId = fee746a4-35f5-43e5-a39f-e2e77ce5bd7c
canonicalWebUrl = http://127.0.0.1:9091/
[database]
type = h2
database = /home/mapa/gerrit_example/db/ReviewDB
[auth]
type = HTTP
[receive]
enableSignedPush = false
[sendemail]
smtpServer = localhost
[container]
user = root
javaHome = /usr/lib/jvm/java-8-openjdk-amd64/jre
[sshd]
listenAddress = *:29418
[httpd]
listenUrl = http://*:9090/
[cache]
directory = cache
和我在 apache 上的虚拟主机配置:
Listen 9091
<VirtualHost *:9091>
ServerName 127.0.0.1
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 /media/sf_shared/.htpasswd
Require valid-user
</Location>
AllowEncodedSlashes On
ProxyPass / http://127.0.0.1:9090/
</VirtualHost>
我得到的只是 result
我已经关注了其他类似问题的教程和解决方案,但没有结果。
【问题讨论】:
-
那你如何访问 Gerrit 呢?应该通过端口 9091
标签: apache authentication configuration gerrit