原创

Tomcat 安装PFX格式证书 https 证书


放在tomcat server.xml

复制代码
<Connector
protocol="org.apache.coyote.http11.Http11NioProtocol"
port="8443" 
URIEncoding="utf-8"
maxThreads="200"
scheme="https" 
secure="true" 
SSLEnabled="true"
keystoreFile="D:\apache-tomcat-7.0.78\cer\3650220_m.berrl.com_tomcat\3650220_m.berrl.com.pfx" 
keystoreType="PKCS12"
keystorePass="v99O73U7" 
clientAuth="false" sslProtocol="TLS"/>
复制代码

 

配置web.xml文件,开启HTTP强制跳转HTTPS。

在文件</welcome-file-list>后添加以下内容:
复制代码
<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->>  
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>  
    </user->>  
</security-constraint>
复制代码

 

正文到此结束
该篇文章的评论功能已被站长关闭
本文目录