Upgrading php-7.3 from php 8.2 on rocky-8.7 but WebSocket connection is not working
Before Upgrade: when WebSocket connection working fine
Rocky: 8.7
PHP: 7.3.33
Laravel: 8.83
beyondcode/laravel-websockets: 1.13.1
pusher/pusher-php-server: 4.1.5
After Upgrade:
Rocky: 8.7
PHP: 8.2.1
Laravel: 9.x
beyondcode/laravel-websockets: 1.13.1
pusher/pusher-php-server: 7.2.1 -> pre-supported version by Laravel 9 (this is installed by dependencies not added in composer.json )
Package.json
pusher-js: 7.0.3
Pusher Connection:
pusher = new Pusher(process.env.MIX_PUSHER_APP_KEY, {
cluster: process.env.MIX_PUSHER_APP_CLUSTER,
encrypted: false,
wsHost: window.location.hostname,
// comment for use port 443
// wsPort: 6001,
// wssPort:6001,
enabledTransports: ["ws", "wss"],
forceTLS: true,
});
httpd: ssl.conf file
<IfModule mod_proxy.c>
ProxyRequests On
SSLProxyEngine On
# Ensure WebSocket protocol is forwarded correctly
RewriteEngine on
RewriteCond %{HTTP:UPGRADE} ^Websocket$ [NC]
RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
RewriteRule /app/(.*) wss://%{HTTP:HOST}:6001/app/$1 [P]
</IfModule>
WebSocket request:
URL: wss://test.com/app/ABCDEFGHIJL?protocol=7&client=js&version=7.0.3&flash=false
Message: WebSocket is closed before the connection is established.
When WebSocket request is sent from the browser using port 443 requests is stuck. Help me in what I'm missing with rocky os
Same settings in Cento OS working fine with php-8.2.1 & Laravel 9