Hey, I use Laravel Reverb for Broadcasting and a client can successfully connect and subscribe private channels. However, if I try to notify an user (with Notification class) I get this error:
Illuminate\Broadcasting\BroadcastException: Pusher error: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Not Found</title>
<style>
/*some not esential CSS here*/
</style>
<style>
body {
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}
</style>
</head>
<body class="antialiased">
<div class="relative flex items-top justify-center min-h-screen bg-gray-100 dark:bg-gray-900 sm:items-center sm:pt-0">
<div class="max-w-xl mx-auto sm:px-6 lg:px-8">
<div class="flex items-center pt-8 sm:justify-start sm:pt-0">
<div class="px-4 text-lg text-gray-500 border-r border-gray-400 tracking-wider">
404 </div>
<div class="ml-4 text-lg text-gray-500 uppercase tracking-wider">
Not Found </div>
</div>
</div>
</div>
</body>
</html>
. in /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php:164
Some of my configuration files (production):
.env
BROADCAST_DRIVER=reverb
BROADCAST_CONNECTION=reverb
PUSHER_APP_ID=###
PUSHER_APP_KEY=###
PUSHER_APP_SECRET=###
PUSHER_HOST="127.0.0.1"
PUSHER_PORT=8080
PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=eu
VITE_APP_NAME="${APP_NAME}"
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
VITE_APP_NAME="${APP_NAME}"
REVERB_SERVER=reverb
REVERB_SERVER_HOST=0.0.0.0
REVERB_SERVER_PORT=8080
REVERB_APP_ID=###
REVERB_APP_KEY=###
REVERB_APP_SECRET=###
REVERB_HOST="website.com"
REVERB_PORT=443
REVERB_SCHEME=https
VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
VITE_REVERB_HOST="${REVERB_HOST}"
VITE_REVERB_PORT="${REVERB_PORT}"
VITE_REVERB_SCHEME="${REVERB_SCHEME}"
Apache configuration file:
SSLEngine On
SSLProxyEngine On
ProxyPass "/app" "ws://127.0.0.1:8080/app"
ProxyPassReverse "/app" "ws://127.0.0.1:8080/app"
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/domain/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain/privkey.pem
I tried it before, "wss" instead of "ws" (in Apache configuration proxy) doesn't work at all - even connection.
It works fine on my PC locally, but the problem is on VPS production server, so I guess that's a configuration problem.
How to solve this problem?
Thanks in advance