代码改变世界

startssl 申请证书,并在Nginx, apache, Tomcat上使用

2014-03-21 13:19  cmsd  阅读(709)  评论(0编辑  收藏  举报

tomcat: http://blog.csdn.net/buyaore_wo/article/details/5771470

apache: http://blog.mowd.tw/index.php?pl=950

Nginx: http://blog.nicky1605.com/the-free-ssl-configuration-startssl-on-nginx.html

 

简要:

apache:

SSLCertificateFile /etc/pki/tls/certs/ssl.crt 
SSLCertificateKeyFile /etc/pki/tls/private/ssl.key 
SSLCertificateChainFile /etc/pki/tls/sub.class1.server.ca.pem 
SSLCACertificateFile /etc/pki/tls /ca.pem

 

tomcat:

选Create PFX file。。。。。。。。。

输入之前保存的两个密文信息及密码

    <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               keystoreFile="证书路径 " keystorePass="密码  keystoreType="PKCS12" 
               clientAuth="false" sslProtocol="TLS" />

 

Nginx:

 listen       443;
 ssl    on;
 ssl_certificate    /usr/local/nginx/conf/Startssl.crt;   #你从StartSSL下载证书放的路径
 ssl_certificate_key     /usr/local/nginx/conf/nicky1605.key;  #openssl生成key路径
 ssl_session_timeout 5m;