配置https的外网访问端口
framework\webapp\config\url.properties
# HTTPS Port (Secure port) port.https.enabled=Y port.https=443 force.https.host=
用于配置默认的端口以及配置ssl证书
framework\catalina\ofbiz-component.xml
<property name="https-connector" value="connector"> <!-- see http://tomcat.apache.org/tomcat-8.0-doc/config/http.html for reference --> <!--<property name="address" value=""/>--> <property name="port" value="端口"/> <property name="protocol" value="HTTP/1.1"/> <property name="scheme" value="https"/> <property name="secure" value="true"/> <property name="SSLEnabled" value="true"/> <property name="URIEncoding" value="UTF-8"/> <property name="xpoweredBy" value="false"/> <property name="compression" value="on"/> <property name="compressableMimeType" value="text/html,text/xml,text/plain,text/javascript,text/css,application/json"/> <!-- SSL connector attributes --> <property name="sslImplementationName" value="org.apache.tomcat.util.net.jsse.JSSEImplementation"/> <property name="algorithm" value="SunX509"/> <!-- the clientAuth to "want" in order to receive certs from the client; note that this isn't set this way by default because with certain browsers (like Safari) it breaks access via HTTPS, so until that problem is fixed the default will be false <property name="clientAuth" value="false"/> --> <property name="keystoreFile" value="JKS文件在项目中的地址"/> <property name="keystorePass" value="***"/> <property name="keystoreType" value="JKS"/> <property name="keyAlias" value="映射的网址"/> <property name="keyPass" value="密码"/> <property name="sslProtocol" value="TLS"/> <property name="ciphers" value=""/> </property>
<container name="catalina-container-test">...</container>中的也是一样设置
配置Apache Java运行端口
framework\start\src\main\java\org\apache\ofbiz\base\start\start.properties
# --- Set these for shutting down when running as background process ofbiz.admin.host=127.0.0.1 ofbiz.admin.port=10523 ofbiz.admin.key=so3du5kasd5dn
当无法读取配置的时候可以修改这里
framework\start\src\main\java\org\apache\ofbiz\base\start\config.java
private int getAdminPort(Properties props, int portOffsetValue) { String adminPortStr = getProperty(props, "ofbiz.admin.port", "0"); int calculatedAdminPort; try { calculatedAdminPort = Integer.parseInt(adminPortStr); calculatedAdminPort = calculatedAdminPort != 0 ? calculatedAdminPort : 10523; // This is necessary because the ASF machines don't allow ports 1 to 3, see INFRA-6790 calculatedAdminPort += portOffsetValue; } catch (Exception e) { System.out.println("Error while parsing admin port number (so default to 10523) = " + e); calculatedAdminPort = 10523; } return calculatedAdminPort; }