]> source.dussan.org Git - sonarqube.git/commitdiff
Property sonar.web.host was used for shutdown port
authorSimon Brandhof <simon.brandhof@gmail.com>
Mon, 21 Oct 2013 15:07:24 +0000 (17:07 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Mon, 21 Oct 2013 15:07:49 +0000 (17:07 +0200)
But not for HTTP/HTTPS connectors

sonar-application/src/main/assembly/conf/sonar.properties
sonar-application/src/main/java/org/sonar/application/Connectors.java

index 3c4b407266ba1ccd332022cd11cb92350ccda106..6f4308af6c973115630ac5de79bb12d99fb06bd3 100644 (file)
@@ -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).
index 684d17c9b116487ba99f47b6979f4db511d7a7a4..0a4bcd8c3c9732ab57b247266d44904af72ab832 100644 (file)
@@ -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;