nginx: [emerg] BIO_new_file("/usr/local/nginx/conf/cert/catcook.crt") failed (SSL: error:02001002:
nginx: [emerg] BIO_new_file("/usr/local/nginx/conf/cert/catcook.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/nginx/conf/cert/catcook.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)
server {
listen 443;
server_name o2o.catcook.top;
root /home/wwwroot/default/ZooLight/public/;
index index.html index.htm;
ssl_certificate cert/catcook.crt;
ssl_certificate_key cert/catcook.top.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location / {
index index.html index.htm;
}
}
原因
配置文件写错了
cert目录下的文件名为catcook.top.crt catcook.top.key
修改配置文件 ssl_certificate cert/catcook.crt;为 ssl_certificate cert/catcook.top.crt;
再次执行nginx -s reload
即可