From cfe2a52c1a719b12dc1b0735b66e6a221f506ed0 Mon Sep 17 00:00:00 2001 From: Evgeny Antyshev Date: Thu, 19 Nov 2015 12:24:07 +0000 Subject: [PATCH] Make Jenkins vhost a host-based Currently, when Apache2 is deciding on which vhost to service the requests, it first looks for the VirtualHost that has the same IP and port as in the request. (http://httpd.apache.org/docs/current/vhosts/details.html) This means, providing "jenkins::master::vhost_name" is resolved on host, and the host has only one IP address, that all requests match this vhost. This prevents from hosting Jenkins on CI host together with zuul and logserver. Change-Id: Idf16c2925ab700107a6fd311e276dc1cdb8ad44d --- templates/jenkins.vhost.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/jenkins.vhost.erb b/templates/jenkins.vhost.erb index de9f22e..e59335e 100644 --- a/templates/jenkins.vhost.erb +++ b/templates/jenkins.vhost.erb @@ -1,4 +1,5 @@ -:80> + + ServerName <%= scope.lookupvar("::jenkins::master::vhost_name") %> ServerAdmin <%= scope.lookupvar("::jenkins::master::serveradmin") %> ErrorLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("::jenkins::master::vhost_name") %>-error.log