nginx
server {
charset utf-8;
client_max_body_size 128M;
listen 80;
listen 443 default ssl;
ssl_certificate /etc/nginx/ssl/cert.pem;
ssl_certificate_key /etc/nginx/ssl/cert.key;
server_name url;
nodejs
const https = require('https'),
fs = require('fs'),
WebSocket = require('ws'),
server = https.createServer({
ssl: true,
cert: fs.readFileSync('/etc/nginx/ssl/cert.pem'),
key: fs.readFileSync('/etc/nginx/ssl/cert.key'),
port: 2052,
}),
nginx находится под cloudflare
Ошибку дает Error in connection establishment: net::ERR_SSL_PROTOCOL_ERROR