centos7 - nginx配置ssl证书报错,错误提示找不到证书文件
本文介绍了centos7 - nginx配置ssl证书报错,错误提示找不到证书文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
我将证书放在 /etc/nginx 下.
[root@VM_76_237_centos nginx]# ls
1_yangxiong666.cn_bundle.crt conf.d fastcgi.conf fastcgi_params koi-utf mime.types nginx.conf scgi_params uwsgi_params win-utf
2_yangxiong666.cn.key default.d fastcgi.conf.default fastcgi_params.default koi-win mime.types.default nginx.conf.default scgi_params.default uwsgi_params.default
[root@VM_76_237_centos nginx]# nginx -s reload
nginx: [emerg] BIO_new_file("/etc/nginx/1_www.yangxiong666.cn_bundle.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/nginx/1_www.yangxiong666.cn_bundle.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)
下面是证书配置
[root@VM_76_237_centos conf.d]# cat ssl.conf
server {
listen 443;
server_name www.yangxiong666.cn;
ssl on;
ssl_certificate 1_www.yangxiong666.cn_bundle.crt;
ssl_certificate_key 2_www.yangxiong666.cn.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://127.0.0.1:8765;
}
}
求大神解决下 实在是不知道怎么搞了.路径也没错啊
这个问题已被关闭,原因:问题已解决 - 问题已解决,且对他人无借鉴意义
解决方案
你总得把Nginx 的 配置贴出来吧......
这篇关于centos7 - nginx配置ssl证书报错,错误提示找不到证书文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文