aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2013-10-21 17:07:24 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2013-10-21 17:07:49 +0200
commitcda2773b5ec6b436c2b966ed04147b1dfeab2f67 (patch)
tree5d13e003ad40f43136a62d8f828d0cc7d8730f9d /sonar-application
parent6079ef842ee0ac3d9f86f2dad3784dc9cb92ac5e (diff)
downloadsonarqube-cda2773b5ec6b436c2b966ed04147b1dfeab2f67.tar.gz
sonarqube-cda2773b5ec6b436c2b966ed04147b1dfeab2f67.zip
Property sonar.web.host was used for shutdown port
But not for HTTP/HTTPS connectors
Diffstat (limited to 'sonar-application')
-rw-r--r--sonar-application/src/main/assembly/conf/sonar.properties6
-rw-r--r--sonar-application/src/main/java/org/sonar/application/Connectors.java2
2 files changed, 5 insertions, 3 deletions
diff --git a/sonar-application/src/main/assembly/conf/sonar.properties b/sonar-application/src/main/assembly/conf/sonar.properties
index 3c4b407266b..6f4308af6c9 100644
--- a/sonar-application/src/main/assembly/conf/sonar.properties
+++ b/sonar-application/src/main/assembly/conf/sonar.properties
@@ -86,8 +86,10 @@ sonar.jdbc.timeBetweenEvictionRunsMillis=30000
#--------------------------------------------------------------------------------------------------
# WEB SERVER
-# Binding address
-#sonar.web.host=0.0.0.0
+# Binding IP address. For servers with more than one IP address, this property specifies which
+# address will be used for listening on the specified ports.
+# By default, ports will be used on all IP addresses associated with the server.
+#sonar.web.host=
# Web context. When set, it must start with forward slash (for example /sonarqube).
# The default value is root context (empty value).
diff --git a/sonar-application/src/main/java/org/sonar/application/Connectors.java b/sonar-application/src/main/java/org/sonar/application/Connectors.java
index 684d17c9b11..0a4bcd8c3c9 100644
--- a/sonar-application/src/main/java/org/sonar/application/Connectors.java
+++ b/sonar-application/src/main/java/org/sonar/application/Connectors.java
@@ -35,7 +35,6 @@ class Connectors {
static final String HTTP_PROTOCOL = "HTTP/1.1";
static void configure(Tomcat tomcat, Props props) {
- tomcat.getServer().setAddress(props.of("sonar.web.host", "0.0.0.0"));
configureShutdown(tomcat, props);
configureConnectors(tomcat, props);
}
@@ -105,6 +104,7 @@ class Connectors {
private static Connector newConnector(Props props, String protocol, String scheme) {
Connector connector = new Connector(protocol);
connector.setURIEncoding("UTF-8");
+ connector.setProperty("address", props.of("sonar.web.host"));
configurePool(props, connector, scheme);
configureCompression(connector);
return connector;