use*_*986 2 apache continuous-integration tomcat http gerrit
我正在尝试设置gerrit HTTP身份验证.我正在阅读gerrit http身份验证中的文档,该身份验证简要介绍了如何设置apache但是我在哪里放置这段代码并配置apache tomcat?
否则,我研究并发现了用于http认证的"siteminder"; 我应该使用它吗?
我的要求是我在自定义系统中拥有自己的一组用户帐户,并且我需要每个用户帐户都能与gerrit交互,所以我认为http允许自定义创建/复制每个帐户.
我花了一段时间才弄明白这一点.
Tomcat已经安装并经过测试.
然后我复制了gerrit war文件并将其放在tomcat/webapps中.然后从tomcat管理器http:// [host]:8080/manager /我安装它(通过单击开始按钮)
然后我不得不安装mysql J Connector.基本上从Mysql下载并将jar文件复制到tomcat/lib中
接下来,我在tomcat/webapps/gerrit/META-INF中创建了一个名为Context.xml的文件
<Context>
<Resource name="jdbc/ReviewDb" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="****" password="******" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/reviewdb"/>
</Context>
Run Code Online (Sandbox Code Playgroud)
因为我曾使用带有守护进程的充气城堡,所以我必须将.jar文件从原始安装复制到tomcat/webapps/gerrit/WEB-INF/lib
然后我设法启动gerrit,看看它是否正常工作.尝试访问http:// [host]:8080/gerrit这应该给你一个关于糟糕的Apache conf的gerrit错误.
比我重新配置我的apache虚拟主机这样.所以我用http:// gerrit/gerrit访问gerrit
然后在将请求传递到tomcat服务器之前使用http auth.
<VirtualHost *:80>
ServerAdmin adrian@iceweasel
ServerName gerrit
ServerAlias gerrit
ErrorLog "logs/error_log"
CustomLog "logs/access_log" vcommon
ProxyRequests Off
ProxyVia Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location /gerrit/login/>
AuthType Basic
AuthName "Gerrit Code Review"
AuthUserFile /rddata/www/gerrit/users
AuthGroupFile /rddata/www/gerrit/groups
Require group review
Order Deny,Allow
Allow from all
</Location>
ProxyPass /gerrit/ http://127.0.0.1:8080/gerrit/
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13364 次 |
| 最近记录: |