【发布时间】:2020-05-29 09:47:51
【问题描述】:
这两天我一直在尝试在 https 中配置我的网站,但没有任何效果。
这是我的配置文件:
worker_processes 1;
error_log logs/error.log info;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 9998 ssl;
server_name mysubdomain.domain.fr;
ssl_certificate "C:/path_to_cert.crt";
ssl_certificate_key "C:/path_to_rsa.rsa";
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;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
在 Firefox 上我有 PR_CONNECT_RESET_ERROR。
使用 openssl -connect : 4384:错误:0200274C:系统库:连接:原因(1868):crypto\bio\b_sock2.c:110: 4384:错误:2008A067:BIO 例程:BIO_connect:连接错误:crypto\bio\b_sock2.c:111: 连接:errno=0
我错过了什么吗? 提前感谢您的帮助
【问题讨论】:
-
您确定
.rsa是正确的密钥文件吗?此外,Windows 会在路径名中向后添加斜杠,但我不知道 nginx 是否会自行解决。 -
感谢您的回答,但我也尝试使用 .key 并且它是相同的,而且我在访问文件时在 error.log 中没有错误。
标签: ssl nginx https windows-server