在配置window下的nginx的时候出现了
nginx: [emerg] cannot load certificate "C:/ssl/1_flyrun.work_bundle.crt": BIO_ne
w_file() failed (SSL: error:02001003:system library:fopen:No such process:fopen(
'C:/ssl/1_flyrun.work_bundle.crt','r') error:2006D080:BIO routines:BIO_new_file:
no such file)
首先nginx在windows配置腾讯云的openssl模块是已经安装好的,所以不需要考虑是ssl模块未安装
其次发现这里的地址出现了问题,应该是搜寻nginx文件下的ssl文件夹下的ssl配置文件,所以对nginx进行以下的调整
server {
listen 443 ssl;
server_name 域名地址;
ssl_certificate ../ssl/1_域名_bundle.crt;
ssl_certificate_key ../ssl/2_域名.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
root html;
index index.html index.htm;
}
}
需要注意当错误为
nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" direct ive instead in C:\nginx-1.19.1/conf/nginx.conf:146
新版本的ssl配置为listen 443 ssl;
旧版本为
listen 443;
ssl on;