node.js - CloudFlare "SSL: Flexible"HTTPS 不适用于自定义端口

标签 node.js ssl https digital-ocean cloudflare

我在 CloudFlare 上的域指向 DigitalOcean Droplet 的 IP 地址。在尝试使用自定义端口通过 CloudFlare 上的域访问网站时,我得到:error 525 SSL handshake failed。我的 CloudFlare Crypto SSL 设置为:Flexible(...据我所知 - DigitalOcean Droplet 不需要 SSL)。


示例地址:

通过 DigitalOcean IPv4(服务器上未安装 SSL)

http://46.101.xxx.xxx/ - 100% 工作

https://46.101.xxx.xxx/ - 0% 根本不工作(服务器设置为:80)

http://46.101.xxx.xxx:2053/api - 100% 工作

http://46.101.xxx.xxx:2083/ - 100% 工作


通过 CloudFlare:

https://example.com/ - 100% 工作

https://example.com:2053/api - 来自 CloudFlare 的 50% 错误:525 SSL 握手失败

https://example.com:2083/ - 来自 CloudFlare 的 50% 错误:525 SSL 握手失败


我将我的服务器配置为使用为 https 连接保留的端口: https://support.cloudflare.com/hc/en-us/articles/200169156-Which-ports-will-Cloudflare-work-with-

当我将主服务器设置为使用端口 :443 而不是 :80 时,它显然不起作用,因为我在服务器上没有 SSL。

应该如何https://example.com:2053/api配置为与 CloudFlare 一起使用?

最佳答案

来自description of Flexible SSL 1:

Flexible SSL: secure connection between your visitor and CloudFlare, but no secure connection between CloudFlare and your web server...This setting will only work for port 443->80, not for the other ports we support like 2053

换句话说:Flexible SSL 无法满足您的需求。


1 使用反射(reflect)撰写答案时间的页面存档版本。原始页面同时发生了变化。

关于node.js - CloudFlare "SSL: Flexible"HTTPS 不适用于自定义端口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42328178/

相关文章:

angularjs - MongoDB - InsertOne() 获取 InsertID

javascript - 正确处理 promise 拒绝

node.js - 使用 docker 构建的 Yarn 工作区

node.js - 清除 SSL 后响应 404 的 nginx 上的 URL

ssl - 为什么我们会收到 cURL 错误 56、SSL 错误号 104?

node.js - 使用 selenium-webdriver/firefox (NodeJS) 设置 userAgent

node.js - 在 node.js 中禁用 TLS 1.1?

android - Google App Engine 自定义 SSL 和 Android SNI + VIP?

python - 在 Python 中使用带有自签名证书的请求时证书验证失败

json - iTunes API 和 HTTPS