通过SSL在Tomcat上运行Moqui

通过SSL在Tomcat上运行Moqui

本文介绍了通过SSL在Tomcat上运行Moqui(设置http-port和htts-port)-返回码302的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个配置了SSL的Tomcat服务器.我可以访问Tomcat Web应用程序管理器,连接是安全的. Tomcat服务器可在端口80和443上访问,并且已被docker化(容器的端口为8080和8443).

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).

该应用程序在http上运行正常,没有发现问题.

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

然后我决定切换到https.因此,我以这种方式修改了MoquiProductionConf.xml网络应用程序标签:

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>

无法在http://或https://上访问该应用程序.我尚未更改http-host/https-host.返回代码是302(根据tomcat的localhost_access_log).

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).

我也必须填写主机吗?我是否需要更改配置中的其他内容?我在框架的WEB-INF文件夹中找到了web.xml文件,其中有一些内容需要修改.

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.

推荐答案

对于那些寻找答案的人-这个对我有用.

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>

希望它对某人有帮助.

这篇关于通过SSL在Tomcat上运行Moqui(设置http-port和htts-port)-返回码302的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 23:47