beyondcode / laravel-websockets

Websockets for Laravel. Done right.
https://beyondco.de/docs/laravel-websockets
MIT License
5.07k stars 613 forks source link

Not able to connect websocket with Ubuntu + Apache Server #983

Closed codoffer closed 7 months ago

codoffer commented 2 years ago

We have followed the instructions and installed it locally. It was working fine with our local host. We have moved a temporary development server (digital ocean - for test purposes with a mobile application as a client) and stopped working.

Server Configuration : Digital Ocean Droplet + Ubutu + Apache 2 + PHP

I have whitelisted the port from the Digital Ocean and the server firewall (allowed the port). I have configured the supervisor and the 6001 port is RUNNING. Checked via (netstat -tulpn | grep 6001)

I have put the application in a folder http://xx.xx.xx.xx/laravel/public/ and am able to access debug dashboard via http://xx.xx.xx.xx/laravel/public/laravel-websockets

ISSUE I am not able to connect with WebSocket and getting the below error with debug dashboard.

WebSocket connection to 'ws://xx.xx.xx.xx:6001/app/local?protocol=7&client=js&version=4.3.1&flash=false' failed:

Question 1: Will I have configured SSL for this? We are in development and want to integrate for testing purposes. Question 2 Can someone help with Apache Proxy Reverse or Condition? Will I have to write those?

Please help me. Thanks in advance.

rajatpatelz commented 2 years ago

This issue can be caused by multiple reasons. Can you share your configuration in websockets.php , broadcasting.php ?