tomcat + ssl + (http ---> https)

SSL Configuration

http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html

1. use jdk to generate keystore.

 cd   ..\JRE1.6.0.30\bin

      run  keytool -genkey -alias [terry-ssl] -keyalg RSA -keystore [terry.keystore] [-validity 365].

2.congifure tomcat.

cd apache-tomcat-7.0.27\conf\server.xml 

change      <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
                maxThreads="150" scheme="https" secure="true"
keystoreFile="terry.keystore"
  keystorePass="changeit"
              clientAuth="false" sslProtocol="TLS" />


http ---> https

1. open the web.xml file.
add:
<!-- SSL settings. only allow HTTPS access to JIRA --> 
<security-constraint>
    <web-resource-collection>
        <web-resource-name>Entire Application</web-resource-name>
        <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <user-data-constraint>
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
</security-constraint> 

發佈了33 篇原創文章 · 獲贊 0 · 訪問量 2萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章