You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error_reporting(E_ALL); ini_set('display_errors', 1);
use Ratchet\Server\IoServer;
use Ratchet\Http\HttpServer;
use Ratchet\WebSocket\WsServer;
use MyChatApp\Chat;
require dirname(__DIR__) . '/vendor/autoload.php';
$server = IoServer::factory(
new HttpServer(
new WsServer(
new Chat()
)
),
8080
);
$server->run();
Everything had been working fine for the last 3 months. but since an hour, I'm getting this error: HTTP ERROR 426
I have been on Google for the last hour and I'm unable to find a solution. Can someone please help me... My services are down..
Please help!!
The text was updated successfully, but these errors were encountered:
In the case of a WebSocket connection, error 426 means that a client's request lacks some required headers for the connection upgrade. We must instruct Apache to add these headers. For this, the code in your Apache conf file should look like this:
#we must add special headers to the websocket requestRewriteEngine On
RewriteCond%{HTTP:Connection}Upgrade[NC]RewriteCond%{HTTP:Upgrade}websocket[NC]RewriteRule/(.*)ws://127.0.0.1:8080/$1[P,L]#redirect an external request to our local websocket serverProxyPass / ws://127.0.0.1:8080
ProxyPassReverse / ws://127.0.0.1:8080
Rocky Linux release 9.3 (Blue Onyx)
Server version: Apache/2.4.57
PHP 8.2.18
Everything had been working fine for the last 3 months. but since an hour, I'm getting this error:
HTTP ERROR 426
I have been on Google for the last hour and I'm unable to find a solution. Can someone please help me... My services are down..
Please help!!
The text was updated successfully, but these errors were encountered: