Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Laravel Websocket won't Connect in production - Apache Server #799

@joneyspark

Description

@joneyspark

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions