【发布时间】:2023-03-24 15:19:01
【问题描述】:
我刚刚使用 apt-get install hudson 命令行在 ubuntu server 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 消息,我错过了什么?
【问题讨论】: