美文网首页
http自动跳转到https的tomcat配置

http自动跳转到https的tomcat配置

作者: do_young | 来源:发表于2019-01-08 10:53 被阅读11次

编辑${tomcat}/conf/web.xml文件,在

<welcome-file-list>

前面添加一段xml配置:

<login-config>  
    <!-- Authorization setting for SSL -->  
    <auth-method>CLIENT-CERT</auth-method>  
    <realm-name>Client Cert Users-only Area</realm-name>  
</login-config>  
<security-constraint>  
    <!-- Authorization setting for SSL -->  
    <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> 

相关文章

网友评论

      本文标题:http自动跳转到https的tomcat配置

      本文链接:https://www.haomeiwen.com/subject/rplvrqtx.html