Search code examples
http-status-code-404ofbiz

OFbiz configuration on production site


I'm new to OFBiz and having trouble making it work on production. I'd appreciate it very much if you could help me to narrow down or even better solve the problem :-)

  1. I was able to able to run OFbiz successfully at localhost and access data that came with the project (ex: https://localhost:8443/webtools/control/entitymaint)

  2. I went through the steps setting up SSL for the project on production site on my Windows Server (I was able to access https://www.mywebsitedomain.com)

  3. I created a folder called ROOT and put the OFBiz folder(same folder on my localhost) in the ROOT folder

  4. I also have set up an SSL Certificate, then added the following to server.xml under Tomcat 9.

    (Connector port="8443" maxThreads="150" scheme="https" secure="true" SSLEnabled="true" keystoreFile="C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\apache-ofbiz-17.12.03\keystore.jks" keystorePass="Password" clientAuth="false" sslProtocol="TLS") (/Connector)

  5. When running https://www.mywebsitedomain/webtools/control/entitymaint(same URL except for localhost), I got the message.

"404 - File or directory not found. The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable."

Edit: Add some additional information

  1. I found the following information on the OFBiz Production SetUP page:

"Configure the ofbiz-containers.xml file to point to your new keystore and password:

If using Tomcat (Catalina), which is the default, find the "catalina-container" -> "https-connector" -> "keystoreFile" and "keystorePass" properties and set them."

I go to apache-ofbiz-17.12.03\framework\base\config\ofbiz-containers.xml All the entries I have are below. I don't know where I can add "keystoreFile" and "keystorePass" properties

<ofbiz-containers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-containers.xsd">

<!-- load the ofbiz component container (always first) -->
<container name="component-container" loaders="main,rmi,load-data,test" class="org.apache.ofbiz.base.container.ComponentContainer"/>

Thanks in advance.

Jessie


Solution

  • As you found, OFBiz uses an embedded Tomcat (9.0.31). So server.xml is of no help. This wiki page needed update, done. The file you are looking for is framework\catalina\ofbiz-component.xml.

    But I'm not sure you are going the right way doing this. Most of the time, it's easier to use Apache HTTPD, even on Windows. You may refer to https://s.apache.org/vmemj. Also for certificates Let's encrypt is what we use for our demos. It's free and, apart the renewal every 3 months, it's great. With their cerbot that's even not a big deal.

    By and large, you should better ask questions in the OFBiz user Mailing List.You need to subscribe, please see https://ofbiz.apache.org/mailing-lists.html

    HTH