Type(Type) 2003/7/23 23:19
E:\Tomcat\conf>%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA
輸入 keystore 密碼: 123456
您的名字與姓氏為何?
[Unknown]: Type
您的編制單位名稱為何?
[Unknown]:
您的組織名稱為何?
[Unknown]:
您所在的城市或地區名稱為何?
[Unknown]: HsinChu
您所在的州及省份名稱為何?
[Unknown]: HsinChu
該單位的二字國碼為何
[Unknown]: tw
CN=Type, OU=Vovo200, O=V2K, L=HsinChu, ST=HsinChu, C=tw 正確嗎?
[否]: y
輸入 <tomcat> 的主密碼
(RETURN 如果和 keystore 密碼相同):
然後在 tomcat/conf/server.xml 把下面這段 remark 拿掉,port 改成想要的 e.g. 443
記得 keystorePass 要在 protocol="TLS" 之前。
===================
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8080" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="443"
acceptCount="100" debug="0" conectionTimeout="20000"
useURIValidationHack="false" disableUploadTimeout="true" />
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="443" minProcessors="5" maxProcessors="75"
enableLookups="true"
acceptCount="100" debug="0" scheme="https" secure="true"
useURIValidationHack="false" disableUploadTimeout="true">
<Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
clientAuth="false" keystorePass="123456" protocol="TLS" />
</Connector>
===================
Type(Type) 2003/7/23 23:22
Then, try you tomcat with prefix "https://"
You will got SSL/TLS protected HTTP transmission.
(5,215 views)
© Vovo2000.com Mobile Version 小哈手機版 2024