ofbiz中配置后台的访问端口

配置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;
}


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值