My setup works perfectly until I enable SSL.
This
starman -p 3001 app.psgi
works fine, but this:
starman --enable-ssl --ssl-cert a.crt --ssl-key a.key -p 3001 app.psgi
does not - generating this error:
Could not finalize SSL connection with client handle (SSL accept attempt failed error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request)
on every request.
Running on perl 5, version 22, subversion 1 on AWS's Ubuntu 16.04.2 LTS
Ports seem to be forwarded ok:
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
This indicates that the client has send a HTTP request instead of the expected HTTPS request. Please check all URL's used by the client - they should all be
https://
and nothttp://
since you setup your server to be accessible by HTTPS only.