Ignore:
Timestamp:
2018-09-06T22:32:58+12:00 (6 years ago)
Author:
ak19
Message:

solr should only be accessible locally (from localhost, specifically 127.0.0.1) which means over http. This conflicted with the previous design of the properties file for working with http and/or https. Now we have tomcat.port.https and localhost.port.http, both always set. In place of server.protocol that used to contain the default protocol, we now have server.protocols which can be set to a comma separated list of one or both of http and https. Drastic restructuring followed. I think I've tested all but https certification stuff.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/server/Server3.java

    r32419 r32429  
    2828            protocolPortProps = new ProtocolPortProperties(config_properties);
    2929        } catch(Exception e) {
    30             String errorMsg = "Error with port/protocol in " + config_properties_file + ": " + protocolPortProps.getErrorMsg();
     30            String errorMsg = "@@@ Error with ports/protocol in " + config_properties_file + ": " + e.getMessage();
    3131
    3232            // print it everywhere, because port/protocol misconfiguration is a fatal error and we're exiting
    33             logger_.error(errorMsg);
     33            logger_.error(errorMsg, e);
    3434            System.err.println(errorMsg);
    3535            // If error, then quit this app as soon as possible
     
    3737        }
    3838       
    39         Property = protocolPortProps.legacyMode ? new Server3Property() : new Server3Property(protocolPortProps.getProtocol());
     39        Property = new Server3Property(protocolPortProps.getDefaultPortPropertyName());
     40               // defaultPortPropertyName can be 'localhost.port.http' or 'tomcat.port.https'
     41               // depending on which of http and https is the first value of 'server.protocols'
    4042
    4143        String frame_title = dictionary.get("ServerControl.Frame_Title");
Note: See TracChangeset for help on using the changeset viewer.