在tomcat中设置http自动跳转https

相关文章:

在CentOS 1804 中的 Tomcat 9 设置 SSL( https ) 加密 (多域名加密,阿里云 SSL+ 腾讯云 SSL)

在CentOS 1804 中设置 Apache Tomcat 9.0.12 开机自启


  1. server.xml设置:
    <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="443" />
  2. web.xml设置(在最后):
    <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>
        </web-resource-collection>
    
        <user-data-constraint>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>
    由于内容较多,建议使用FlashFXP下载修改后,再上传覆盖。

    重启Tomcat测试。

相关文章:

在CentOS 1804 中的 Tomcat 9 设置 SSL( https ) 加密 (多域名加密,阿里云 SSL+ 腾讯云 SSL)

在CentOS 1804 中设置 Apache Tomcat 9.0.12 开机自启

猜你喜欢

转载自blog.csdn.net/qq_32596527/article/details/82795771