将tomcat6.0的http协议改成https协议

来源:互联网 发布:游戏开发中使用的算法 编辑:程序博客网 时间:2024/05/21 19:32

这个适合apache-tomcat-6.0.29的修改

到tomcat目录下的config文件夹将server.xml改成

1、    <!-- Define a SSL HTTP/1.1 Connector on port 8443
         This connector uses the JSSE configuration, when using APR, the
         connector should be using the OpenSSL style configuration
         described in the APR documentation -->

2、  <!-- <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" /> --!>

  在第二段添加一段话
    
     <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS"
               keystoreFile="C:\Program Files (x86)\Apache Software Foundation\Tomcat 6.0\conf\tomcat.keystore"
               keystorePass="yhuser"/
>

 

 

另外在config文件夹中添加tomcat.keystore文件

 

然后重启tomcat

 

 

原创粉丝点击