#Get 404 when send event

4 messages · Page 1 of 1 (latest)

dapper haven
#

Here is my reverb setup

    server_name demopos.test.com;
    root /var/www/html/pos/public;
    index index.html index.htm index.php;
    error_page 404 /index.php;
    location / {
        ...
    }

    location /app/ {
        proxy_pass    http://127.0.0.1:1234; # Reverb service
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

Here is the log, there is 404 error in POST /apps/740980/events

Message Handled ........................................ 771569956.346946369
  200    GET /test/1 ................................................. 26.71 ms
  2024-12-18 16:42:17 App\Events\OrderNotification ................... RUNNING
  404    POST /apps/740980/events ..................................... 4.83 ms
  2024-12-18 16:42:17 App\Events\OrderNotification .............. 27.70ms FAIL                                                                                                                                                                                                                                                                                          Pruning Stale Connections ..................................................
  Pinging Inactive Connections ...............................................

here is my .env

REVERB_APP_ID=740980
REVERB_APP_KEY=58r8kysncndftylrszaj
REVERB_APP_SECRET=ibf80btfzomtpiaxwe6v
REVERB_HOST=demopos.test
.com
REVERB_PORT=
REVERB_SCHEME=https
REVERB_SERVER_PORT=1234

VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
VITE_REVERB_HOST="${REVERB_HOST}"
VITE_REVERB_PORT="${REVERB_PORT}"
VITE_REVERB_SCHEME="${REVERB_SCHEME}"
narrow flower
#

That would happen if the API isn't available publicly. So, if you use Reverb on the same server as your webserver, you should use this config;

REVERB_HOST=demopos.test
REVERB_PORT=443
REVERB_SCHEME=https
REVERB_SERVER_PORT=1234
REVERB_SERVER_HOST=127.0.0.1

Then internal communication would be through localhost, and the client would connect to demopos.test

vital citrus
#

Is it /app/ (nginx config) or /apps/ (your example request)?

narrow flower
#

Both /app and /apps are used with Reverb, one is for the Pusher API, the other is for the WS connection on the client. The pusher API could be private tho.