}
public static DeploymentConfig getDeploymentConfigurationFromSystemProperties(String variablesPrefix, Map<String, String> defaultOverrides) {
DeploymentConfig ret = new DeploymentConfig();
TokenReplacingProperties properties = new TokenReplacingProperties(defaultOverrides);
addDefaultVariables(properties, variablesPrefix);
properties.putAll(System.getProperties());
variablesPrefix += ".";
ret.serverRoot = properties.get(variablesPrefix + SERVER_ROOT);
ret.documentRoot = properties.get(variablesPrefix + DOCUMENT_ROOT);
ret.documentRoot = ret.documentRoot == null ? "htdocs" : ret.documentRoot;
ret.snmpHost = properties.get(variablesPrefix + SNMP_HOST);
ret.snmpHost = ret.snmpHost == null ? "localhost" : ret.snmpHost;
String snmpPort = properties.get(variablesPrefix + SNMP_PORT);
snmpPort = snmpPort == null ? "1610" : snmpPort;
ret.snmpPort = Integer.parseInt(snmpPort);
ret.mainServer.address1 = HttpdAddressUtility.parseListen(properties.get(variablesPrefix + LISTEN1));
ret.mainServer.address2 = HttpdAddressUtility.parseListen(properties.get(variablesPrefix + LISTEN2));
ret.mainServer.address3 = HttpdAddressUtility.parseListen(properties.get(variablesPrefix + LISTEN3));
ret.mainServer.address4 = HttpdAddressUtility.parseListen(properties.get(variablesPrefix + LISTEN4));
ret.mainServer.serverNameDirective = properties.get(variablesPrefix + SERVERNAME_DIRECTIVE);
String additionalDirectives = properties.get(variablesPrefix + ADDITIONAL_DIRECTIVES);
fillAdditionalDirectives(additionalDirectives, ret.mainServer.additionalDirectives);
readVHostConfigFromProperties(ret.vhost1, variablesPrefix + VHOST + 1, properties);
readVHostConfigFromProperties(ret.vhost2, variablesPrefix + VHOST + 2, properties);
readVHostConfigFromProperties(ret.vhost3, variablesPrefix + VHOST + 3, properties);