我有一个配置了SSL的Tomcat服务器。我可以访问Tomcat Web应用程序管理器,连接是安全的。Tomcat服务器可以在端口80和443上访问,并且是停靠的(容器的端口是8080和8443)。
该应用程序在http上运行良好,没有发现任何问题。
然后我决定切换到https。所以我这样修改了MoquiProductionConf.xml web-app标签:
<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文件,其中是否有需要修改的内容。
发布于 2016-07-04 23:06:38
对于那些正在寻找答案的人来说--这个方法对我很有效。
<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>希望这能帮助到别人。
https://stackoverflow.com/questions/38180365
复制相似问题