Running Moqui on Tomcat over SSL (setting http-port and htts-port) - return code 302

风格不统一 提交于 2020-01-17 04:43:05

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/38180365/running-moqui-on-tomcat-over-ssl-setting-http-port-and-htts-port-return-code

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!