【问题标题】:Redirect Jenkins and Sonatype Nexus on port 80在端口 80 上重定向 Jenkins 和 Sonatype Nexus
【发布时间】:2015-04-09 13:55:55
【问题描述】:

我已经配置了 Jenkins(my.example.com:8080/jenkins) 和 Nexus (my.example.com:8081/nexus)。两者都安装在单个服务器上,即 CentOS 6.6 x64。要启动 Jenkins,我使用命令“service jenkins start”,对于 nexus,我使用“service nexus start”。只是提到我没有将它们都部署在tomcat上。我只想摆脱使用端口号。意思是说对于 Jenkins 的 url 必须是“my.example.com/jenkins”,对于 nexus 来说是“my.example.com/nexus”。您能否建议我如何实现这一目标?

【问题讨论】:

    标签: jenkins port nexus


    【解决方案1】:

    安装一个 Apache HTTP 服务器,它获取对 my.example.com 的请求并与每个链接的端口进行通信...设置这个环境有点棘手,如果你没有对 http 服务器进行足够的实验,它将需要很多时间...

    【讨论】:

      【解决方案2】:

      使用 nginx 完成。
      只需转到:nginx:/etc/nginx/conf.d/default.conf
      location ~ /jenkins {
      return 301 my.example.com:8080/jenkins;
      }
      location ~ /nexus {
      return 301 my.example.com:8081/nexus;
      }

      【讨论】:

        猜你喜欢
        • 2012-08-22
        • 2017-07-01
        • 2019-02-02
        • 1970-01-01
        • 1970-01-01
        • 2013-10-26
        • 2014-04-14
        • 2021-05-28
        • 2015-03-15
        相关资源
        最近更新 更多