我刚刚使用apt-get install hudson命令行在ubuntu服务器14上安装了hudson 3.1.2。
安装完成后,我更改了默认配置文件,以便在url中使用/ hudson访问hudson。我还配置了http端口和ajp端口,如下所示:
HTTP_PORT=8082
AJP_PORT=8029
HUDSON_ARGS="--prefix=/hudson --webroot=/var/run/hudson/war --httpPort=$HTTP_PORT --ajp13Port=$AJP_PORT"
重新启动时,一切正常。
然后我在apache2配置目录中配置了workers.properties文件,如下所示:
worker.list=worker1,artifactory,hudson
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.artifactory.type=ajp13
worker.artifactory.host=localhost
worker.artifactory.port=8019
worker.hudson.type=ajp13
worker.hudson.host=localhost
worker.hudson.port=8029
以及默认启用的网站如下:
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
JkMount /penny* worker1
JkMount /manager* worker1
JkMount /artifactory* artifactory
JkMount /hudson* hudson
JkMount /jira* worker1
</VirtualHost>
当输入完整的IP地址和端口时,我可以毫无问题地访问Hudson,当使用ipaddress / hudson访问时,我从apache获取Service Unavailable消息,我缺少什么?
答案 0 :(得分:0)
JkMount / hudson * hudson - 您可以删除&#34; *&#34;之后&#34; / hudson&#34;从配置和验证。它应该工作。
我相信你会启用Mod_JK模块。
请您发布jenkins配置文件。
完整的worker.properties文件。