#--------------------------------------------------------------------------------------------------
# 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).
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);
}
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;