Jenkins website root path

前端 未结 11 542
不思量自难忘°
不思量自难忘° 2020-12-01 06:07

I\'m trying to follow the directions here: https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache to set up my Jenkins server to appear at http://myhost/j

相关标签:
11条回答
  • 2020-12-01 07:04

    you need to edit jenkins config file in directory such like : sudo vi /etc/default/jenkins and change var HTTP_PORT next restart jenkins sudo /etc/init.d/jenkins restart

    hope this is helpful

    0 讨论(0)
  • 2020-12-01 07:08

    I needed to configure Jenkins on a CentOS box via Puppet using the rtyler/jenkins module. Looking through the module code might suggest that HTTP_PORT and PREFIX should be the parameters in the config_hash but this did not work for me. What worked for me was something like the following Puppet configuration:

      class { 'jenkins':
        config_hash  => { 
           'JENKINS_PORT' => { 'value' => '8085' },
           'JENKINS_ARGS' => { 'value' => '--prefix=/jenkins' },
        },
      }
    

    I was able to confirm that this updated the contents of "/etc/sysconfig/jenkins" (I believe this is the CentOS/RedHat file location).

    0 讨论(0)
  • 2020-12-01 07:09
    1. Add prefix attribute to /etc/default/jenkins file:

      JENKINS_ARGS="--webroot=/var/cache/jenkins/war --prefix=/jenkins --httpPort=$HTTP_PORT --ajp13Port=$AJP_PORT

    2. Configure your web server (e.g. - nginx) to redirect /jenkins to localhost:8080;

    0 讨论(0)
  • 2020-12-01 07:11

    I'm not sure if people are still looking for this, but as I just ran across it, I figured I'd post my solution here.

    By following the instructions at here, I was able to set the context located in Library/Preferences/org.jenkins-ci.plist to a more preferable address. The link has all the settings you can edit with an OS X native install.

    0 讨论(0)
  • 2020-12-01 07:12

    Not sure where to look in config.xml, but at http://myhost/jenkins/configure, there's an option called "Jenkins URL" that you can use to set that.

    0 讨论(0)
提交回复
热议问题