peer closed connection in SSL handshake

Posted July 18, 2020 11.1k views
NginxApacheServer Optimization

I have a problem with my server

2020/07/18 08:41:34 [error] 1031#1031: *3044185 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client:, server:, request: "GET /api/v3/latest-chapter?API_key=Hs0-23@vqaZgM(g&page=1 HTTP/1.1", upstream: "", host: ""

Control Panel: cpanel
System: CentOS 7.0
Server: Apache & Nginx

Thank you

edited by MattIPv4

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Hi @bilalezzat,

It seems like you are using Nginx as a reverse proxy. In such case you’ll need to add the following option to your configuration file

proxy_ssl_server_name on;

That way you’ll ensure you are passing your SSL when proxying connections.


Hi there @bilalezzat,

What I could suggest in this case is, in order to resolve the SSL error, I would recommend using an actual domain name with Nginx reverse proxy.

That way rather than having your API at: https://your_ip:8443/api which results in an SSL error, you could have it at:

Hope that this helps!