AhmedEx
New Pleskian
- Server operating system version
- Ubuntu 22.04.1
- Plesk version and microupdate number
- 18.0.46
i have plesk server with apache2 and nginx and i have a websocket app it works on port
and i used ratchet and autobahn to work with websocket, nginx version
and ufw status
and my nginx directive config for websocket
my js to connect to wss
and i keep getting connection failed in my browser
btw it was works so fine on my old VPS and there was some settings inside the directive config for nginx that made it worked, but when i moved on new VPS i lost this settings, so i hope if someone can help me setup the perfect settings for it again to make it accept websocket requests.
EDIT: proxy mode is disabled, and still dun work.
thanks.
Code:
2589
Code:
nginx version: nginx/1.20.2
Code:
Status: inactive
Code:
location ^~ /WsConn
{
add_header 'Access-Control-Allow-Origin' '*';
proxy_pass http://localhost:2589;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Client-Verify SUCCESS;
proxy_set_header X-NginX-Proxy true;
proxy_read_timeout 60;
proxy_connect_timeout 60;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
Code:
new ab.Session(
'wss://domain.com/WsConn',
function() {
console.log('Connected!');
}
function() {
console.warn('SOCKET DISCONNECTED, WAIT NOW!!');
}, {
'skipSubprotocolCheck': true
}

btw it was works so fine on my old VPS and there was some settings inside the directive config for nginx that made it worked, but when i moved on new VPS i lost this settings, so i hope if someone can help me setup the perfect settings for it again to make it accept websocket requests.
EDIT: proxy mode is disabled, and still dun work.
thanks.