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>
正文到此结束
热门推荐
相关文章
该篇文章的评论功能已被站长关闭