在nginx主目录下创建sslcrt目录,将证书文件放到sslcrt目录下,在主目录创建ssl加载证书文件配置
vim wmmzz.com_ssl.conf
listen 443 ssl;
ssl_certificate sslcrt/wmmzz.com.cer;
ssl_certificate_key sslcrt/wmmzz.com.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
在虚拟主机配置文件中引用该文件
#在server块中添加
server {
include wmmzz.com_ssl.conf;
}