zoukankan      html  css  js  c++  java
  • 配置ssl

    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>
    

      *******************************现在用的下面的*********************************

    1、下载tomcat的证书,解压;

    2、上传到Tomcat根目录下的cert文件夹

    3、配置server.xml

        <Connector port="80" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   redirectPort="443"  URIEncoding="UTF-8" useBodyEncodingForURI="true"/>
    			   
    		<Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol"
               maxThreads="150"
              SSLEnabled="true">
                <SSLHostConfig>
                <Certificate  certificateKeystoreFile="cert/2075587_beicaiduo.com.pfx"
                certificateKeystorePassword="VV5OflnA"
                 certificateKeystoreType="PKCS12" />
    			 </SSLHostConfig>
        </Connector>
    	 <Connector port="8009" protocol="AJP/1.3" redirectPort="443" />
    

      4、防火墙,阿里云的安全配置

    5、重启完事

    www.beicaiduo.com
  • 相关阅读:
    记录下我的阿里云centos服务器之路
    git-ftp 用git管理ftp空间
    标准插件写法
    函数防抖 主要用于限制高频触发事件函数的执行间隔
    js 各进制前缀 及 转换
    微信 小程序 canvas
    微信 小程序 drawImage wx.canvasToTempFilePath wx.saveFile 获取设备宽高 尺寸问题
    canvas画布在主流浏览器中的尺寸限制
    js的一些坑,持续增加,学习js应该注意的问题
    js => ES6一个新的函数写法
  • 原文地址:https://www.cnblogs.com/hoge66/p/9682670.html
Copyright © 2011-2022 走看看