0

I have a Tomcat server with SSL configured. I can access the Tomcat Web Application Manager, the connection is secured. Tomcat server is accessible on ports ports 80 and 443, and is dockerized (the container's ports are 8080 and 8443).

The application is working fine over http, no problems spotted.

Then I decided to switch to https. So I modified the MoquiProductionConf.xml web-app tag this way:

<webapp-list>
    <!-- NOTE: when you set https-enabled="true" make sure to set the http-port and https-port attributes -->
    <webapp name="webroot" http-port="80" http-host=""
            https-port="443" https-host="" https-enabled="true"
            require-session-token="true">
        <root-screen host=".*" location="component://webroot/screen/webroot.xml"/>
    </webapp>
</webapp-list>

The app is neither accessible on http:// nor on https://. I have not changed the http-host/https-host. The return code is 302 (according to tomcat's localhost_access_log).

Do I have to fill in the hosts as well? Do I have to change anything else in the configuration? I found the web.xml file in the framework's WEB-INF folder, is there something in it that needs a modification.

mrovnanik
  • 123
  • 9

1 Answers1

0

For those searching for an answer - this one worked for me.

<webapp-list>
    <!-- NOTE: when you set https-enabled="true" make sure to set the http-port and https-port attributes -->
    <webapp name="webroot" http-port="80" http-host="<server_address>"
            https-port="443" https-host="<server_address>" https-enabled="true"
            require-session-token="true">
        <root-screen host=".*" location="component://webroot/screen/webroot.xml"/>
    </webapp>
</webapp-list>

Hope it helps someone.

mrovnanik
  • 123
  • 9
  • Did you literally have "" in there, or something like "demo.moqui.org" (i.e. a valid hostname)? I'm guessing that's what you meant, but wanted to verify. The thing to look at is what sort of screen URLs moqui is generating and make sure they are accessible... sometimes when going through a proxy or whatever the Servlet container (Tomcat in this case) doesn't get the correct external hostname, hence the need for these configuration settings. – David E. Jones Jul 05 '16 at 06:52
  • Right now, I have not met any problems regarding the configuration, since all is done on a single server without any specialities. And yes, I added address (or name) in style "serverx.mydomain.sk". The should have been a hint. – mrovnanik Jul 06 '16 at 07:13