I have installed reverb on my laravel application it works fine in localhost but when I add it to my VPS I get this error
WebSocket connection to 'wss://localhost:8080/app/1vgpypraslvezinneor5?protocol=7&client=js&version=8.4.0-rc2&flash=false' failed
I don't have any experience with VPS, and this is my first time. I have read other StackOverflow questions and GitHub issues and also asked chatGPT but no luck.
my .env file
REVERB_APP_ID=12345REVERB_APP_KEY=56789REVERB_APP_SECRET=1234567REVERB_HOST="pedexpress.io"REVERB_PORT=8080REVERB_SCHEME=httpVITE_REVERB_APP_KEY="${REVERB_APP_KEY}"VITE_REVERB_HOST="${REVERB_HOST}"VITE_REVERB_PORT="${REVERB_PORT}"VITE_REVERB_SCHEME="${REVERB_SCHEME}"REVERB_TLS_CERTIFICATE=/etc/ssl/certs/your_certificate.crtREVERB_TLS_KEY=/etc/ssl/private/your_private.key
my event
class testingEvent implements ShouldBroadcast{ use Dispatchable, InteractsWithSockets, SerializesModels; private $message; public function __construct($message) { // $this->message = $message; } public function broadcastOn(): array { return [ new Channel('testChannel'), ]; } public function broadcastwith(): array { return ['message' => $this->message, ]; }
also, I added this in my httpd.conf file in my VPS found here and opened the 8080 port
<IfModule mod_proxy.c> # Proxy configuration<Proxy http://0.0.0.0:8080> ProxyPreserveHost On ProxyPassReverse / ProxyPassReverseCookiePath / /app</Proxy> # Rewrite rules RewriteEngine On RewriteCond %{REQUEST_URI} ^/app RewriteRule ^(.*)$ http://0.0.0.0:8080/$1 [P,L]</IfModule>
config/reverb.php
'servers' => ['reverb' => ['host' => env('REVERB_SERVER_HOST', '0.0.0.0'),'port' => env('REVERB_SERVER_PORT', 8080),'hostname' => env('REVERB_HOST'),'options' => ['tls' => ['certificate' => env('REVERB_TLS_CERTIFICATE'),'key' => env('REVERB_TLS_KEY'), ], ],'max_request_size' => env('REVERB_MAX_REQUEST_SIZE', 10_000),'scaling' => ['enabled' => env('REVERB_SCALING_ENABLED', false),'channel' => env('REVERB_SCALING_CHANNEL', 'reverb'),'server' => ['url' => env('REDIS_URL'),'host' => env('REDIS_HOST', '127.0.0.1'),'port' => env('REDIS_PORT', '6379'),'username' => env('REDIS_USERNAME'),'password' => env('REDIS_PASSWORD'),'database' => env('REDIS_DB', '0'), ], ],'pulse_ingest_interval' => env('REVERB_PULSE_INGEST_INTERVAL', 15),'telescope_ingest_interval' => env('REVERB_TELESCOPE_INGEST_INTERVAL', 15), ], ],
when I run php artisan reverb:start --debug
on Termius I see this
Pruning Stale Connections ..........................................Pinging Inactive Connections........................................
if required I can provide more info and codes