开发者社区> 问答> 正文

tomcat 配置强制启用 https - 配置报错

"

如下配置,想强制启用https ,可是只有谷歌有效果,火狐和IE都不起作用。请问下是配置错了还是少哪里没有配置?

<login-config>
    <auth-method >CLIENT-CERT</auth-method>
    <realm-name>Client Cert Users-only Area</realm-name>
  </login-config>

  <security-constraint>
    <web-resource-collection>
      <web-resource-name>SSL</web-resource-name>
      <url-pattern>/*</url-pattern><!-- ????SSL -->
    </web-resource-collection>
    <user-data-constraint>
      <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
  </security-constraint>



"

展开
收起
montos 2020-06-03 20:30:10 831 0
1 条回答
写回答
取消 提交回答
  • "

    <span style=""font-family:"font-size:13.3333px;background-color:#FFFFFF;""><span style=""font-family:"font-size:14px;background-color:#FFFFFF;"">除了配置这里,还得加上这个,表示80端口都转到 433端口,433端口就是配置安全访问的端口,tomcat默认是8443  ,https 默认是 433 。

    <Connector port="80" protocol="HTTP/1.1" 
    
    connectionTimeout="20000" redirectPort="443" URIEncoding="UTF-8"/>



    "
    2020-06-03 20:46:07
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Apache Tomcat 的云原生演进 立即下载
CDN助力企业网站进入HTTPS时代 立即下载
《Nginx 代理系统常用手册》 立即下载