首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >通过SSL在Tomcat上运行Moqui (设置http-port和htts-port) -返回代码302

通过SSL在Tomcat上运行Moqui (设置http-port和htts-port) -返回代码302
EN

Stack Overflow用户
提问于 2016-07-04 16:47:39
回答 1查看 230关注 0票数 0

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

该应用程序在http上运行良好,没有发现任何问题。

然后我决定切换到https。所以我这样修改了MoquiProductionConf.xml web-app标签:

代码语言:javascript
复制
<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)。

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

EN

回答 1

Stack Overflow用户

发布于 2016-07-04 23:06:38

对于那些正在寻找答案的人来说--这个方法对我很有效。

代码语言:javascript
复制
<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>

希望这能帮助到别人。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38180365

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档