我需要在Apache后面配置Jenkins。为此,我使用httpd-2.2.25-win32-x86-openssl-0.9.8y.msi安装了Apache 2.2。 现在我用 -
配置了jenkins--httpPort=8084 --prefix=/jenkins (inside jenkins.xml)
Jenkins的securityRealm
是(我正在使用LDAP身份验证):
<securityRealm class="hudson.security.LDAPSecurityRealm" plugin="ldap@1.11">
<server>ldap://ldap.myserver.com:1234</server>
<rootDN>DC=blah-blah,DC=blah</rootDN>
<inhibitInferRootDN>false</inhibitInferRootDN>
<userSearchBase></userSearchBase>
<userSearch>SAMAccountName={0}</userSearch>
<groupSearchFilter></groupSearchFilter>
<groupMembershipStrategy class="jenkins.security.plugins.ldap.FromGroupSearchLDAPGroupMembershipStrategy">
<filter></filter>
</groupMembershipStrategy>
<managerDN>email@mycompany.com</managerDN>
<managerPasswordSecret>XXXX</managerPasswordSecret>
<disableMailAddressResolver>false</disableMailAddressResolver>
<displayNameAttributeName>displayname</displayNameAttributeName>
<mailAddressAttributeName>mail</mailAddressAttributeName>
<userIdStrategy class="jenkins.model.IdStrategy$CaseInsensitive"/>
<groupIdStrategy class="jenkins.model.IdStrategy$CaseInsensitive"/>
</securityRealm>
Apache和Jenkins托管服务器的名称是:http://abchost/ 詹金斯主持:http://abchost:8084/jenkins。
现在我需要配置Apache服务器,当我在浏览器中输入http://abchost/jenkins时,代理应该在两者之间工作,它应该将请求转发到http://abchost:8084/jenkins并再次获取来自jenkins的结果,并将结果显示在:http://abchost/jenkins。
为此,我已经像这样配置了Apache:
NameVirtualHost abchost:80
Listen 80
ProxyRequests Off
ProxyPreserveHost On
AllowEncodedSlashes On
<VirtualHost *:80>
ServerName abchost.com
ServerAdmin admin@abchost.com
ProxyPass /downloads !
Alias /downloads "d:\myPath1"
<Directory "d:\myPath2">
# Don't allow editing the main repository site.
Options -Indexes
</Directory>
<Directory "d:\myPath3">
# Remove 'Parent Directory' link from the site.
# IndexIgnore ..
#
Options +Indexes
# List file names which will be opened automatically when the folder is opened.
DirectoryIndex index.html toc.html
IndexOptions FancyIndexing HTMLTable FoldersFirst SuppressDescription
</Directory>
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
# Jenkins via HTTP.
ProxyPass /jenkins/ http:/abchost:8084/jenkins/ nocanon
ProxyPassReverse /jenkins http://abchost:8084/jenkins/
</VirtualHost>
完成此配置后,我可以使用http:/ abchost:8084 / jenkins /登录jenkins,但不能使用http:/ abchost / jenkins /.
要注意的是:
当我使用正确的用户ID和pswd登录http:/ abchost / jenkins /时,看起来页面刷新并再次显示空白登录页面。
当我使用错误的用户ID和pswd组合登录http:/ abchost / jenkins /时,它会显示LDAP身份验证失败的消息。
任何人都可以开导我吗?
提前致谢!