nginxsslhttpssslhandshakeexceptionbad-gateway

Server domain returning 502 Bad Gateway - Nginx


I am not able to access my server through domain name. Its showing 502 Bad Gateway.

Error log showing SSL_do_handshake() failed.

But its running successfully when i access through ip address.

/etc/nginx/sites-available/default file

/var/log/nginx/error.log showing this error -

[error] 13728#13728: *1 SSL_do_handshake() failed (SSL: error:1408F10B:SSL routines:ssl3_get_record:wrong version number) while SSL handshaking to upstream, client: 179.43.169.181, server: www.myvaccinenotifier.me, request: "GET / HTTP/1.1", upstream: "https://128.199.21.142:3000/", host: "myvaccinenotifier.me"

Probably its due to some mistage in nginx configuration... Help me correct it.

PS: I'm new to this.


Solution

  • Not much is known about your setup, but one can make the following observations:

    Recommendations: