【问题标题】:Cannot configure SSL with nginx on windows server无法在 Windows 服务器上使用 nginx 配置 SSL
【发布时间】: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


【解决方案1】:

找了几天问题的根源,原来是这台电脑上安装的IIS,之前在这个端口上配置的,阻塞了连接。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-05
    • 2020-10-16
    • 1970-01-01
    • 2018-01-24
    • 1970-01-01
    相关资源
    最近更新 更多