Hi,

On mardi 21 mai 2019 19:42:35 CEST, Celejar wrote:
I'm trying to access my Mojolicious::Lite web app via HTTPS, but it's not working: the SSL connection is apparently immediately reset by the server:

~$ perl/app.pl daemon -l https://*:3000
[2019-05-21 13:40:24.49479] [10969] [info] Listening at "https://*:3000";
Server available at https://127.0.0.1:3000

...

~$ openssl s_client  -connect localhost:3000
CONNECTED(00000003)
write:errno=104
---
no peer certificate available

This is usually the result when the server does not send a certificate

Did you generate and configure a certificate and key ?

Example (on Debian buster/testing) :

$ mojo daemon -l 'https://*:3000' $ curl -k https://localhost:3000 curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to localhost:3000


$ openssl req -x509 -nodes -newkey rsa:4096 -keyout key.pem -out cert.pem -days 2 -sha256 -subj '/CN=localhost'
$ mojo daemon -l 'https://*:3000?cert=cert.pem&key=key.pem'
$ curl -k https://localhost:3000
Your Mojo is working!

See the doc for how to use a configuration file :

https://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Hypnotoad
https://mojolicious.org/perldoc/Mojo/Server/Daemon#listen

--
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/5e5b6345-6d7f-4556-ab11-6929b37edf66%40team1664.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to