https_配置流程__


在命令行下,,执行    tomcat 6 jdk 6;


C:\Users\ruirui>keytool -genkey -v -alias tomcat -keyalg RSA -keystore D:/my.keystore -dname

"CN=127.0.0.1,OU=crea,O=crea,L=hangzhou,ST=zhejiang,C=CN" -validity 3650 -storepass 123456 -keypass 123456
正在为以下对象生成 1,024 位 RSA 密钥对和自签名证书 (SHA1withRSA)(有效期为 3,650 天):
         CN=127.0.0.1, OU=crea, O=crea, L=hangzhou, ST=zhejiang, C=CN
[正在存储 D:/my.keystore]



-keystore为证书生成的地址名字和后缀皆可自定义
-dname中的CN为服务器端访问域名,若设置错误则浏览器会弹出警告窗口,提示用户证书与所在域不匹配。
-validity为证书有效天数。

 




  <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
    <Connector port="80" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />

   <!-- Define a SSL HTTP/1.1 Connector on port 8443 -->

   <Connector port="443" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" disableUploadTimeout="true"
               acceptCount="100" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" keystoreFile="D:/my.keystore" keystorePass="123456"/>


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



https://localhost/note/1.jsp

你可能感兴趣的:(tomcat,C++,c,Scheme,C#)