Nginx抛出400错误请求

时间:2018-10-25 10:45:54

标签: nginx

我已将Nginx配置为Windows Server 2012 r2上的反向代理。

我已经对Nginx服务器上的配置文件进行了如下更改,以配置客户端证书验证。

 server {

    error_log "C:/Error/error.log" debug;
    listen       443 ssl; 
    server_name  localhost;

    ssl_certificate      "C:/VinCert/New25/server.crt";
    ssl_certificate_key  "C:/VinCert/New25/server.key";
    ssl_client_certificate "C:/VinCert/New25/ca.crt";       

    ssl_verify_client on;
    proxy_ssl_server_name on; 
    proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    proxy_ssl_session_reuse off;

    location / {
        root   html;
        index  index.html index.htm;
        proxy_pass https://x.x.x.x/Mywebservice;
    }
}

我使用以下链接生成了证书 http://nategood.com/client-side-certificate-authentication-in-ngi

我已经在服务器和客户端上同时安装了服务器和客户端证书,并将它们导入到受信任的根证书颁发机构。

在完成上述所有配置后,当我尝试在浏览器上浏览Web服务( https://x.x.x.x/Mywebservice )时,收到“ 400错误的请求,不需要SSL”证书已发送

此外,当我从本地计算机向nginx服务器发送客户端证书时,出现以下错误。  “ {System.Net.WebException:错误:SecureChannelFailure(对SSPI的调用失败,请参阅内部异常。)---> System.Security.Authentication.AuthenticationException:对SSPI的调用失败,请参阅内部异常。 -> Mono.Btls.MonoBtlsException:系统调用   在:0的Mono.Btls.MonoBtlsContext.ProcessHandshake()[0x00038]处   在Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake中(Mono.Net.Security.AsyncOperationStatus状态)[0x0003e]在:0中   在(包装器远程调用检查)at Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake(Mono.Net.Security.AsyncOperationStatus)   在Mono.Net.Security.AsyncHandshakeRequest.Run

请帮助我解决此问题。

谢谢, Vinod

0 个答案:

没有答案