首页 > 解决方案 > 无法在 Windows 服务器上使用 nginx 配置 SSL

问题描述

这两天我一直在尝试在 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:error:0200274C:system library:connect:reason(1868):crypto\bio\b_sock2.c:110: 4384:error:2008A067:BIOroutines:BIO_connect:connect error:crypto\bio\ b_sock2.c:111: 连接:errno=0

我错过了什么吗?预先感谢您的帮助

标签: sslnginxhttpswindows-server

解决方案


经过几天的寻找问题的根源,原来它来自安装在这台计算机上的IIS,并且之前配置在这个端口上阻塞了连接。


推荐阅读