码迷,mamicode.com
首页 > 其他好文 > 详细

配置ssl

时间:2018-09-20 19:18:19      阅读:163      评论:0      收藏:0      [点我收藏+]

标签:ant   防火墙   dex   https   nta   div   apach   efi   highlight   

1、配置

<Connector port="80" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="443" />
<Connector port="443" protocol="org.apache.coyote.http11.Http11Protocol" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" 
            keystoreFile="cert/xxx.jks" keystorePass="xxxxx"/>

<Connector port="8009" protocol="AJP/1.3" redirectPort="443" />

  密码设置成一样的,省心;

2、在tomcat 下mkdir cert,在cert下根据命令创建jks:

keytool -importkeystore -srckeystore 2#############951.pfx -destkeystore sslkey.jks -srcstoretype PKCS12 -deststoretype JKS

3、开启443防火墙;

4、conf 下的web.xml配置

<welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
    </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-data-constraint>
 <transport-guarantee>CONFIDENTIAL</transport-guarantee>
 </user-data-constraint>
 </security-constraint>

  

配置ssl

标签:ant   防火墙   dex   https   nta   div   apach   efi   highlight   

原文地址:https://www.cnblogs.com/hoge66/p/9682670.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!