I added a Nginx as reverse proxy for my Node server, my certificates were generated by Let's Encrypt Certbot. Everything works fine when my Node is listening on port 443 and using the certificates, but when I use Nginx for listening on port 443 using the same certificates, I am having this error (from browser) :
(failed)net::ERR_SSL_PROTOCOL_ERROR
Here is my Nginx site-available conf for my domain :
server{
listen 443 ssl;
server_name xxxxxx.hstgr.cloud;
ssl_certificate /...path.../fullchain.pem;
ssl_certificate_key /...path.../privkey.pem;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
location /.well-known/acme-challenge/ {
autoindex on;
root /...path.../.well-known/acme-challenge;
}
}
}
Can anyone enlight me, what is wrong with this conf giving the ERR_SSL_PROTOCOL_ERROR ?
error_log /var/log/nginx/error.log;so i guess no error is generated in Nginx ?openssl s_client -connect xxxxxx.hstgr.cloud:443openssl versionto check)? What is openssl version your nginx server is linked to (nginx -Vto check)?