keytool -importkeystore -srckeystore 订单号.pfx -destkeystore your-name.jks -srcstoretype PKCS12 -deststoretype JKS
keystoreFile="/你的磁盘目录/your-name.jks"
keystorePass="证书解压密码"
<Connector port="8443" protocol="HTTP/1.1"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
keystoreFile="/你的磁盘目录/your-name.jks"
keystorePass="证书解压密码"
clientAuth="false" sslProtocol="TLS" />
( 注意:不要直接拷贝所有配置,只需添加 keystoreFile,keystorePass,keystorePass等参数即可,其它参数请根据自己的实际情况修改 )
# HTTPS server
# #server {
# listen 443;
# server_name localhost;
# ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_timeout 5m;
# ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
# ssl_prefer_server_ciphers on;
# location / {
#
#
#}
#}
server {
listen 443; server_name localhost;
ssl on;
root html;
index index.html index.htm;
ssl_certificate 磁盘目录/订单号.pem;
ssl_certificate_key 磁盘目录/订单号.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL;
ssl_prefer_server_ciphers on;
location / {
root html;
index index.html index.htm;
}
}
#LoadModule ssl_module modules/mod_ssl.so (如果找不到请确认是否编译过 openssl 插件)
#Include conf/extra/httpd_ssl.conf
·添加 SSL 协议支持语句,关闭不安全的协议和加密套件
SSLProtocol all -SSLv2 -SSLv3
·修改加密套件如下
SSLCipherSuite AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL;
·将服务器证书公钥配置到该路径下(在 conf 目录下创建 ssl 目录,将 for Apache 里面的三 个证书文件拷贝到 ssl 目录下)
SSLCertificateFile conf/ssl/public.pem (证书公钥)
·将服务器证书私钥配置到该路径下
SSLCertificateKeyFile conf/ssl/订单号.key (证书私钥)
·将服务器证书链配置到该路径下
SSLCertificateChainFile conf/ssl/chain.pem (证书链)删除行首的“#”号注释符