我有一个Fedora服务器运行Jenkins,我通过yum安装它。一切都很好,我可以用http://ci.mydomain.com访问它。
但是现在,我想用https://ci.mydomain.com访问它,这样用户名和密码的登录就被加密了。
我该怎么做?
下面是我的/etc/sysconfig/jenkins文件。启动Jenkins工作,但我不能用https://ci.mydomain.com或http://ci.mydomain.com:443的but浏览器访问Jenkins,
## Path: Development/Jenkins
## Description: Configuration for the Jenkins continuous build server
## Type: string
## Default: "/var/lib/jenkins"
## ServiceRestart: jenkins
#
# Directory where Jenkins store its configuration and working
# files (checkouts, build reports, artifacts, ...).
#
JENKINS_HOME="/var/lib/jenkins"
## Type: string
## Default: ""
## ServiceRestart: jenkins
#
# Java executable to run Jenkins
# When left empty, we'll try to find the suitable Java.
#
JENKINS_JAVA_CMD=""
## Type: string
## Default: "jenkins"
## ServiceRestart: jenkins
#
# Unix user account that runs the Jenkins daemon
# Be careful when you change this, as you need to update
# permissions of $JENKINS_HOME and /var/log/jenkins.
#
JENKINS_USER="jenkins"
## Type: string
## Default: "-Djava.awt.headless=true"
## ServiceRestart: jenkins
#
# Options to pass to java when running Jenkins.
#
JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true"
## Type: integer(0:65535)
## Default: 8080
## ServiceRestart: jenkins
#
# Port Jenkins is listening on.
#
JENKINS_PORT="8080"
## Type: integer(1:9)
## Default: 5
## ServiceRestart: jenkins
#
# Debug level for logs -- the higher the value, the more verbose.
# 5 is INFO.
#
JENKINS_DEBUG_LEVEL="5"
## Type: yesno
## Default: no
## ServiceRestart: jenkins
#
# Whether to enable access logging or not.
#
JENKINS_ENABLE_ACCESS_LOG="no"
## Type: integer
## Default: 100
## ServiceRestart: jenkins
#
# Maximum number of HTTP worker threads.
#
JENKINS_HANDLER_MAX="100"
## Type: integer
## Default: 20
## ServiceRestart: jenkins
#
# Maximum number of idle HTTP worker threads.
#
JENKINS_HANDLER_IDLE="20"
## Type: string
## Default: ""
## ServiceRestart: jenkins
#
# Pass arbitrary arguments to Jenkins.
# Full option list: java -jar jenkins.war --help
#
JENKINS_ARGS="--httpsPort=443 --httpsKeyStore=/root/.keystore --httpsKeyStorePassword=MYPASSWORD"发布于 2011-06-07 13:01:02
此页面将帮助您在Apache (它将处理HTTPS)之后设置它:https://wiki.eclipse.org/Hudson-ci/Running_哈德森_在后面_阿帕奇
除了是“正常”的反向代理之外,您还需要这样做(如该页面所示):
Header edit Location ^http://www.example.com/hudson/ https://www.example.com/hudson/发布于 2012-09-28 20:09:24
注意到(某时?)Jenkins可以为您生成密钥,只需在--httpsPort=(portnum)中设置JENKINS_ARGS参数即可。
在我的例子中,我设置了JENKINS_PORT="-1" (禁用http)和设置--httpsPort=8080,这对我自己的目的很好。
请注意,任何低于1000的端口通常都需要根访问,因此请选择高于此值的端口.
(链接获取更多信息)
https://serverfault.com/questions/278555
复制相似问题