Enable WebSocket in Cpanel Server with Nginx

cPanel Server

On a Cpanel server, WebSocket server was running on port 8080. It worked fine with HTTP. After enabling HTTPS, it stopped working. The website code had the following entry var websocket_server = new WebSocket(“ws://domain.com:8080”); This Cpanel server had ea-nginx (Nginx provided by Cpanel) installed. To fix the error, I created a file vi /etc/nginx/conf.d/ws-domain.com.conf In … Read more

WebSocket

WebSocket Server is a technology that enables real-time communication between a web application and a server. It provides a bidirectional data transmission mechanism that allows both the client and the server to send messages to each other simultaneously. Unlike traditional HTTP communication, WebSockets enable full-duplex communication between the client and server, making it ideal for … Read more