【问题标题】:Jenkins behind an Apache with mod_proxyJenkins 使用 mod_proxy 支持 Apache
【发布时间】:2012-09-20 14:46:23
【问题描述】:

我按照说明操作,但在 Jenkins 面前使用 Apache 的反向代理不起作用。我已经设置了一个代理 Jenkins 的 Apache 虚拟主机配置:

Apache 虚拟主机

<VirtualHost *:8084>
    ServerAdmin emil@my_email.com
    ProxyRequests     Off
    ProxyPass         /jenkins  http://localhost:8084/jenkins
    ProxyPassReverse  /jenkins  http://localhost:8084/jenkins
    <Proxy http://localhost:8084/jenkins*>
      Order allow,deny
      Allow from all
     </Proxy>
    ProxyPreserveHost on
 </VirtualHost>

虚拟主机已激活,没有错误。

您可以在此处查看我对 /etc/default/jenkins 所做的更改:

HTTP_PORT=8084
...
PREFIX=/jenkins
...
JENKINS_ARGS="--httpListenAddress=127.0.0.1 --webroot=/var/cache/jenkins/war --prefix=$PREFIX --httpPort=$HTTP_PORT --ajp13Port=$AJP_PORT"

我正在跟踪 apache 日志和 jenkins,但是当我尝试访问 http://:8084/jenkins 时,我什么也没得到,没有页面。当我在没有--httpListenAddress=127.0.0.1的情况下启动Jenkins时,我打开http://:8084/jenkins成功,但是这是直接访问Jenkins,不通过Apache。

任何想法我的反向代理配置中可能存在什么问题?这很标准。

谢谢,

埃米尔

【问题讨论】:

    标签: apache continuous-integration jenkins mod-proxy


    【解决方案1】:

    我忘记在 ports.conf 中添加“Listen 8084”指令,所以 Apache 没有在那里监听。反正解决了,周五晚上不应该做设置。

    【讨论】:

    • 当我进行相同的配置并启动 apache 并点击 jenkins url 时,会创建无限数量的 apache2 任务......你能帮帮我吗?
    猜你喜欢
    • 2012-08-26
    • 1970-01-01
    • 1970-01-01
    • 2010-10-31
    • 1970-01-01
    • 2010-11-08
    • 2012-10-05
    • 2013-10-03
    • 1970-01-01
    相关资源
    最近更新 更多