【发布时间】:2017-09-28 11:05:57
【问题描述】:
我收到此错误:
错误前端:502 Bad gateway
99.110.244:443
2017/09/28 13:03:51 [错误] 34080#34080: *1062 对等在 SSL 握手中关闭连接(104:连接由对等重置),同时 SSL 与上游握手,客户端:10.210.0.81,服务器: webshop.domain.be,请求:“GET / HTTP/1.1”,上游:“https://10.1.10.61:443/”,主机:“webshop.domain.be”
配置:
# Zone voor connection logging
limit_conn_zone $binary_remote_addr zone=izSSL_webshop-api_CZ:10m;
# Zone voor rate logging
# Hoge rate limit. x r/s is soms wat snel
# 10 MB (10m) will give us enough space to store a history of 160k requests.
limit_req_zone $binary_remote_addr zone=izSSL_webshop-api_RZ:10m rate=20r/s;
upstream webshop_domain_be {
server webshop.domain.be:443;
}
server {
listen 443 ssl;
server_name webshop.domain.be webshop;
client_max_body_size 80M;
ssl_session_cache shared:webshopSSL:1m;
ssl_session_timeout 10m;
ssl_certificate /var/www/certs/webshop.domain.be/webshop.domain.be-chain.pem;
ssl_certificate_key /var/www/certs/webshop.domain.be/webshop.domain.be-key.pem;
ssl_verify_client off;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers RC4:HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
proxy_ssl_session_reuse off;
proxy_pass $scheme://webshop_domain_be;
}
}
nginx 版本:nginx/1.10.3 (Ubuntu)
其他服务器 (10.1.10.61) 是具有 相同证书 的 IIS 服务器,与我在此代理中使用的一样(正确吗?)。这不是 IIS 问题。并且代理服务器可以到达10.1.10.61 / 443端口
基于https://serverfault.com/questions/583374/configure-nginx-as-reverse-proxy-with-upstream-ssl配置
我正在使用 Let's Encrypt 证书。
【问题讨论】:
-
尝试将
proxy_ssl_server_name on;添加到您的 proxy_pass 块中,看看是否有帮助 -
试过了,还是不行。不过还是谢谢。
-
怎么两个名字都是
webshop.domain.be? -
哦,是的,这很愚蠢,但供应商明确要求它是这种方式而不是 IP。无论如何,即使使用IP也没有什么区别。 (诀窍是:代理服务器在我们所有的 DNS 记录中都称为此名称,但在代理的 /etc/hosts 中它被否决并引用另一个)
-
尝试将
webshop.domain.be:443更改为实际ip。并使用proxy_ssl_name "webshop.domain.be"。如果这不起作用,请尝试添加proxy_ssl_server_name on;以及