Laravel Websocket won't Connect in production - Apache Server
Asked by Joney Spark · · 12481 views
Hi, in my VPS centos 7 I'm using an apache server and configure Supervisor Successfully. But I'm struggling to connect WebSocket or unable to configure a subdomain for the WebSocket. please help if you can
Thanks in advance
#broadcasting.php
<?php
return [
'default' => env('BROADCAST_DRIVER', 'pusher'),
'connections' => [
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'useTLS' => false,
'encrypted' => false,
'host' => '000.000.000.0', // here I put my real IP address
'port' => 6001,
'scheme' => 'http'
],
],
],
];
#Supervisor command
[program:laravel-websockets]
command=php /var/www/html/website.com/artisan websockets:serve --host 000.000.000.0 --port 6001
numprocs=1
user=root
autostart=true
autorestart=true
stderr_logfile=/var/www/html/website.com/storage/logs/websockets.err.log
stdout_logfile=/var/www/html/website.com/storage/logs/websockets.out.log
after this configuration, I'm trying to browse https://website.com/laravel-websockets and get the panel to see but when I press the connect button it's not working. please help me
0
0
0 Answers
Please login or create new account to participate in this conversation.