为什么 SSL 在 Starman 中失败
Why does SSL fail in Starman
在启用 SSL 之前,我的设置工作正常。
这个
starman -p 3001 app.psgi
工作正常,但是这个:
starman --enable-ssl --ssl-cert a.crt --ssl-key a.key -p 3001 app.psgi
不会 - 生成此错误:
Could not finalize SSL connection with client handle (SSL accept attempt failed error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request)
根据每个请求。
运行 在 Perl 5,版本 22,AWS 的 Ubuntu 16.04.2 LTS
上的颠覆 1
端口似乎转发正常:
Chain PREROUTING (policy ACCEPT)
num target prot opt source destination
1 REDIRECT tcp -- anywhere anywhere tcp dpt:https redir ports 3001
2 REDIRECT tcp -- anywhere anywhere tcp dpt:https redir ports 3001
3 REDIRECT tcp -- anywhere anywhere tcp dpt:http-alt redir ports 3001
4 REDIRECT tcp -- anywhere anywhere tcp dpt:http redir ports 3001
Could not finalize SSL connection with client handle (SSL accept attempt failed error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request)
这表明客户端发送了一个 HTTP 请求,而不是预期的 HTTPS 请求。请检查客户端使用的所有 URL - 它们应该都是 https://
而不是 http://
,因为您将服务器设置为只能通过 HTTPS 访问。
我有这样的问题并通过安装解决了
python-certbot-apache
来自 debian apt repo
但现在我有另一个问题:
SSL_cert_file /etc/letsencrypt/live/..domain_here../cert.pem 无法使用:权限被拒绝/usr/local/share/perl/5.28.1/IO/Socket/SSL.pm 行 2375.
更改目录没有帮助。
在启用 SSL 之前,我的设置工作正常。
这个
starman -p 3001 app.psgi
工作正常,但是这个:
starman --enable-ssl --ssl-cert a.crt --ssl-key a.key -p 3001 app.psgi
不会 - 生成此错误:
Could not finalize SSL connection with client handle (SSL accept attempt failed error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request)
根据每个请求。
运行 在 Perl 5,版本 22,AWS 的 Ubuntu 16.04.2 LTS
上的颠覆 1端口似乎转发正常:
Chain PREROUTING (policy ACCEPT)
num target prot opt source destination
1 REDIRECT tcp -- anywhere anywhere tcp dpt:https redir ports 3001
2 REDIRECT tcp -- anywhere anywhere tcp dpt:https redir ports 3001
3 REDIRECT tcp -- anywhere anywhere tcp dpt:http-alt redir ports 3001
4 REDIRECT tcp -- anywhere anywhere tcp dpt:http redir ports 3001
Could not finalize SSL connection with client handle (SSL accept attempt failed error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request)
这表明客户端发送了一个 HTTP 请求,而不是预期的 HTTPS 请求。请检查客户端使用的所有 URL - 它们应该都是 https://
而不是 http://
,因为您将服务器设置为只能通过 HTTPS 访问。
我有这样的问题并通过安装解决了 python-certbot-apache 来自 debian apt repo
但现在我有另一个问题:
SSL_cert_file /etc/letsencrypt/live/..domain_here../cert.pem 无法使用:权限被拒绝/usr/local/share/perl/5.28.1/IO/Socket/SSL.pm 行 2375.
更改目录没有帮助。