Skip to content

LARAVEL REVERB PRODUCTION | Laravel 11 reverb + inertia-vue | Pagoda server | Issue: WebSocket is closed before the connection is established #51568

Answered by janzcio
janzcio asked this question in Q&A
Discussion options

You must be logged in to vote

It is now up and running, thanks to Franz Marvin Horfilla.

Here are his configurations, which I have copied exactly

nginx.conf

He added a /ws prefix to the location. You should be careful here instead of using the /app or any existing prefix that will lead you to conflict that fails the wss

location /ws/ {
        proxy_pass                          http://127.0.0.1:6050/;
        
        proxy_http_version 1.1;
        proxy_set_header Host $http_host;
        proxy_set_header Scheme $scheme;
        proxy_set_header SERVER_PORT $server_port;
        proxy_set_header REMOTE_ADDR $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header U…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@janzcio
Comment options

@wilianmaique
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by janzcio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants