【发布时间】:2016-01-24 20:03:34
【问题描述】:
Nginx 1.9.5 (linux Centos7)--> MS IIS 8.5 所以我尝试使用 nginx 作为 IIS 的客户端反向代理,在 IIS 级别需要客户端证书身份验证。 nginx:443->>IIS:443+客户端证书认证。
示例位置代理通行证 这里还有我尝试的注释命令。
location ^~ /test/ {
#proxy_buffering off;
#proxy_http_version 1.0;
#proxy_request_buffering off;
#proxy_set_header Connection "Keep-Alive";
#proxy_set_header X-SSL-CERT $ssl_client_cert;
# proxy_ssl_name domain.lv;
#proxy_ssl_trusted_certificate /etc/nginx/ssl/root/CA.pem;
#proxy_ssl_verify_depth 2;
proxy_set_header HOST domain.com;
proxy_ssl_certificate /etc/nginx/ssl/test.pem;
proxy_ssl_certificate_key /etc/nginx/ssl/test_key.pem;
proxy_ssl_verify off;
proxy_pass https://10.2.4.101/;
}
在 IIS 上很简单。
- 创建新网站。
- 在受信任的根目录中导入 CA 证书。
- 需要设置 ssl 证书。
测试我得到了什么:
- 需要通过浏览器直接访问 IIS 客户端证书——有效。
- Nginx 到其他 nginx 客户端证书需要--工作。
- Nginx 到 IIS 客户端证书忽略--工作
- 需要或接受 Nginx 到 IIS 客户端证书 - 不起作用
错误: Nginx 端: *4622 从上游读取响应头时上游超时(110:连接超时) IIS 端: 500 0 64 119971
所以我希望有人能知道为什么?
编辑 1. 也尝试从不同的服务器使用 nginx 1.8 没有任何帮助..
proxy_ssl_verify off;
proxy_ssl_certificate /etc/nginx/ssl/test/test.pem;
proxy_ssl_certificate_key /etc/nginx/ssl/test/test_key.pem;
proxy_pass https://domain.com;
2.尝试与 apache 2.4 相同
SSLProxyEngine On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
SSLProxyMachineCertificateFile /etc/httpd/ssl/test.pem
ProxyPass "/test" "https://domain.com"
也许在 nginx 中进行 ssl 重新协商???
【问题讨论】:
标签: authentication iis ssl nginx reverse-proxy