我收到此错误:
错误前端:502 Bad gateway
99.110.244:443
2017/09/28 13:03:51 [错误] 34080#34080:* 1062对等关闭连接在SSL握手(104:连接重置由对等),而SSL握手到上游,客户端:10.210.0.81,服务器: webshop.izegem.be,请求:“GET / HTTP / 1.1”,上游:“https://10.1.10.61:443/”,主持人:“webshop.domain.be”
配置:
def timeit(method):
def timed(*args, **kw):
ts = time.time()
result = method(*args, **kw)
te = time.time()
# print('%r (%r, %r) %2.2f sec' % \
# (method.__name__, args, kw, te - ts))
print(te - ts)
return result
return timed
@timeit
def f1():
time.sleep(1)
return "abc"
result = f1()
print(type(result))
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的加密证书。
答案 0 :(得分:6)
在proxy_pass为我工作之后添加此行。
proxy_ssl_server_name on;
在此之前,我是从here
在REDHAT 7 / CentOS 7 / Oracle Linux 7中: 在您的环境中安装证书。
不确定最后两个步骤是否需要,但是对我都有用。
干杯
答案 1 :(得分:2)
我遇到了这个问题,我不得不将其移到我的位置区域
proxy_ssl_name your.proxiedserver.name;
proxy_ssl_server_name on;
答案 2 :(得分:1)
更改您的上游以使用IP
Sub Test_Comparisons()
CompareWorksheets "A1:L30", Worksheets("DS"), Worksheets("HT"), Worksheets("NM")
CompareRanges Worksheets("DS").Range("A1:L30"), Worksheets("HT").Range("K11:V40"), Worksheets("NM").Range("A101:L130")
End Sub
Sub CompareWorksheets(CompareAddress As String, ParamArray arrWorkSheets() As Variant)
Application.ScreenUpdating = False
Dim cell As Range
Dim x As Long
Dim bFlag As Boolean
'Reset all the colors
For x = 0 To UBound(arrWorkSheets)
arrWorkSheets(x).Range(CompareAddress).Interior.ColorIndex = xlNone
Next
For Each cell In arrWorkSheets(0).Range(CompareAddress)
bFlag = False
For x = 1 To UBound(arrWorkSheets)
If arrWorkSheets(x).Range(cell.ADDRESS).Value <> cell.Value Then
bFlag = True
Exit For
End If
Next
If bFlag Then
For x = 0 To UBound(arrWorkSheets)
arrWorkSheets(x).Range(cell.ADDRESS).Interior.ColorIndex = 22
Next
End If
Next
Application.ScreenUpdating = True
End Sub
Sub CompareRanges(ParamArray arrRanges() As Variant)
Application.ScreenUpdating = False
Dim cell As Range
Dim x As Long, y As Long, z As Long
Dim bFlag As Boolean
'Reset all the colors
For z = 0 To UBound(arrRanges)
arrRanges(z).Interior.ColorIndex = xlNone
Next
For x = 1 To arrRanges(0).Rows.Count
For y = 1 To arrRanges(0).Rows.Count
For z = 1 To UBound(arrWorkSheets)
If arrWorkSheets(1).Cells(x, y).Value <> arrWorkSheets(z).Cells(x, y).Value Then
bFlag = True
Exit For
End If
Next
If bFlag Then
For z = 0 To UBound(arrWorkSheets)
arrWorkSheets(z).Cells(x, y).Interior.ColorIndex = 22
Next
End If
Next
Next
Application.ScreenUpdating = True
End Sub
然后将upstream webshop_domain_be {
server <IP>:443;
}
块更改为
proxy_pass
如果以上操作无效,请将location / {
proxy_ssl_session_reuse off;
proxy_ssl_server_name "webshop.domain.be";
proxy_pass $scheme://webshop_domain_be;
}
添加到配置
答案 3 :(得分:0)
要改善其他答案,我会说
upstream
真的很重要
对于从一个域到另一个域的简单重定向,只需使用以下方法:
http {
....
upstream someserver {
server your.domain.name.com:443;
}
location / {
proxy_pass https://someserver;
}
}
答案 4 :(得分:0)
我使用此@nginx
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 1h;
ssl_buffer_size 4k;
与
grep worker_processes /etc/nginx/nginx.conf
worker_processes auto; <<<-- auto not the default value "1"
答案 5 :(得分:0)
这对我有用。我在服务器部分设置了具有通配符搜索的server_name,并且必须在位置部分执行以下操作:
proxy_ssl_name $host;
proxy_ssl_server_name on;
proxy_pass https://istio-ingress-gateway