@luceos Websocket proxy is set up and it's establishing connections but still browser can't establish connection to it.
Websocket proxy setting on OLS vhost:
extprocessor app {
type proxy
address 127.0.0.1:6001
maxConns 1000
pcKeepAliveTimeout 600
initTimeout 600
retryTimeout 0
respBuffer 0
}
context /app {
type proxy
handler app
addDefaultCharset off
enableRewrite On
rewriteCond %{HTTP:Upgrade} =websocket
rewriteCond %{HTTP:Connection} upgrade [NC]
rewriteRule .* ws://127.0.0.1:6001/$1 [P,L]
addResponseHeaders Access-Control-Allow-Origin: *
addResponseHeaders Access-Control-Allow-Headers: Content-Type, Authorization, X-Requested-With
}
listener SSL {
address *:443
secure 1
map domain.org domain.org
websocket enabled 1
sslCertFile /www/server/panel/vhost/cert/domain.org/fullchain.pem
sslKeyFile /www/server/panel/vhost/cert/domain.org/privkey.pem
}
php flarum realtime:serve -vvv --debug
Config.php
'websocket' => [
'server-host' => '127.0.0.1',
'server-port' => 6001,
'js-client-host' => 'www.domain.org',
'js-client-port' => 443,
'js-client-secure' => true,
'php-client-secure'=> false,
'php-client-host' => 'localhost',
],
Browser Console:
WebSocket connection to 'wss://www.domain.org/app/454f9e6c415d997c47c4d4de916d52ef?protocol=7&client=js&version=7.4.0&flash=false' failed: WebSocket is closed before the connection is established.
Firefox can’t establish a connection to the server at wss://www.domain.org/app/454f9e6c415d997c47c4d4de916d52ef?protocol=7&client=js&version=7.4.0&flash=false.
I'll really appreciate some help.